summaryrefslogtreecommitdiff
path: root/arch/x86/events/intel/uncore_discovery.c
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2022-01-13 14:05:54 -0800
committerPeter Zijlstra <peterz@infradead.org>2022-01-18 12:09:49 +0100
commit5a4487f9ef5ef2fdb3215cadf0a9c3e5e8678634 (patch)
treefc7ce98acd320f6c46f8ac77bae3477f7489fe6d /arch/x86/events/intel/uncore_discovery.c
parent6b19788ddc5937831ffd27525a1b793953fd2d2b (diff)
perf/x86/intel/uncore: Add IMC uncore support for ADL
Current ADL uncore code only supports the legacy IMC (memory controller) free-running counters. Besides the free-running counters, ADL also supports several general purpose-counters. The general-purpose counters can also be accessed via MMIO but in a different location. Factor out __uncore_imc_init_box() with offset as a parameter. The function can be shared between ADL and TGL. The event format and the layout of the control registers are a little bit different from other uncore counters. The intel_generic_uncore_mmio_enable_event() can be shared with client IMC uncore. Expose the function. Add more PCI IDs for ADL machines. Fixes: 772ed05f3c5c ("perf/x86/intel/uncore: Add Alder Lake support") Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/1642111554-118524-1-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events/intel/uncore_discovery.c')
-rw-r--r--arch/x86/events/intel/uncore_discovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/events/intel/uncore_discovery.c b/arch/x86/events/intel/uncore_discovery.c
index 3049c646fa20..6ddadb482f68 100644
--- a/arch/x86/events/intel/uncore_discovery.c
+++ b/arch/x86/events/intel/uncore_discovery.c
@@ -494,8 +494,8 @@ void intel_generic_uncore_mmio_enable_box(struct intel_uncore_box *box)
writel(0, box->io_addr);
}
-static void intel_generic_uncore_mmio_enable_event(struct intel_uncore_box *box,
- struct perf_event *event)
+void intel_generic_uncore_mmio_enable_event(struct intel_uncore_box *box,
+ struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;