perf/x86/intel/uncore: Generic support for the MSR type of uncore blocks
authorKan Liang <kan.liang@linux.intel.com>
Wed, 17 Mar 2021 17:59:34 +0000 (10:59 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 2 Apr 2021 08:04:54 +0000 (10:04 +0200)
commitd6c754130435ab786711bed75d04a2388a6b4da8
tree80f9dca448bee3f7144b8bf6db45f5d6f1cfe092
parentedae1f06c2cda41edffc93de6aedc8ba8dc883c3
perf/x86/intel/uncore: Generic support for the MSR type of uncore blocks

The discovery table provides the generic uncore block information for
the MSR type of uncore blocks, e.g., the counter width, the number of
counters, the location of control/counter registers, which is good
enough to provide basic uncore support. It can be used as a fallback
solution when the kernel doesn't support a platform.

The name of the uncore box cannot be retrieved from the discovery table.
uncore_type_&typeID_&boxID will be used as its name. Save the type ID
and the box ID information in the struct intel_uncore_type.
Factor out uncore_get_pmu_name() to handle different naming methods.

Implement generic support for the MSR type of uncore block.

Some advanced features, such as filters and constraints, cannot be
retrieved from discovery tables. Features that rely on that
information are not be supported here.

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/1616003977-90612-3-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