OSDN Git Service

perf/x86/intel/uncore: Add IMC uncore support for ADL
authorKan Liang <kan.liang@linux.intel.com>
Thu, 13 Jan 2022 22:05:54 +0000 (14:05 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 18 Jan 2022 11:09:49 +0000 (12:09 +0100)
commit5a4487f9ef5ef2fdb3215cadf0a9c3e5e8678634
treefc7ce98acd320f6c46f8ac77bae3477f7489fe6d
parent6b19788ddc5937831ffd27525a1b793953fd2d2b
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
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_discovery.c
arch/x86/events/intel/uncore_discovery.h
arch/x86/events/intel/uncore_snb.c