[PATCH 0/7] perf: Add Sapphire Rapids server uncore support

kan.liang
2021-06-24T01:36:52Z

From: Kan Liang <kan.liang@linux.intel.com>

Intel Sapphire Rapids supports a discovery mechanism, that allows an
uncore driver to discover the different components ("boxes") of the
chip.

All the generic information of the uncore boxes should be retrieved from
the discovery tables. This has been enabled with the commit edae1f06c2cd
("perf/x86/intel/uncore: Parse uncore discovery tables"). The uncore
driver doesn't need to hard code the generic information for each uncore
box. But we still need to enable various functionality that cannot be
directly discovered. This is done in the patchset.

Without this platform-specific enabling patch set, perf uses a type ID
plus a box ID, e.g., uncore_type_0_0 to name an uncore PMU. With the
patch set, perf has the mapping information from a type ID to a specific
uncore unit. Just like the previous platforms, the uncore PMU can be
named by the real PMU name, e.g., uncore_cha_0. To make the name
backward-compatible, a symlink is created from the new to the old name.
So the user scripts which use the old name still work.

The uncore spec of Sapphire Rapids server can be found at
https://cdrdv2.intel.com/v1/dl/getContent/642245

Kan Liang (7):
driver core: Add a way to get to bus devices kset
perf: Create a symlink for a PMU
perf/x86/intel/uncore: Create a symlink for an uncore PMU
perf/x86/intel/uncore: Add Sapphire Rapids server support
perf/x86/intel/uncore: Factor out snr_uncore_mmio_map()
perf/x86/intel/uncore: Support free-running counters on Sapphire
Rapids server
perf/x86/intel/uncore: Fix invalid unit check

arch/x86/events/intel/uncore.c | 44 ++-
arch/x86/events/intel/uncore.h | 5 +
arch/x86/events/intel/uncore_discovery.c | 42 +--
arch/x86/events/intel/uncore_discovery.h | 23 +-
arch/x86/events/intel/uncore_snbep.c | 508 ++++++++++++++++++++++++++++++-
drivers/base/bus.c | 6 +
include/linux/device/bus.h | 1 +
include/linux/perf_event.h | 1 +
kernel/events/core.c | 19 ++
9 files changed, 607 insertions(+), 42 deletions(-)

--
2.7.4