perf/x86/uncore: Add a quirk for UPI on SPR
authorKan Liang <kan.liang@linux.intel.com>
Thu, 12 Jan 2023 20:01:04 +0000 (12:01 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Jan 2023 23:06:13 +0000 (00:06 +0100)
commit65248a9a9ee1ea2e6aad8f35253ffd9096ab81b7
tree7ea961c0465d7e5484f9d4855836acedbb221b68
parentbd9514a4d5ec25b29728720ca8b3a9ac4e3137d7
perf/x86/uncore: Add a quirk for UPI on SPR

The discovery table of UPI on some SPR variants, e.g., MCC, is broken.
The third UPI table may includes a wrong address which points to a
non-exists device. The bug impacts both UPI and M3UPI uncore PMON.

Use a pre-defined UPI and M3UPI table to replace the broken table.

Different BIOS may populate a device into a different domain or a
different BUS. The accurate location can only be retrieved at load time.
Add spr_update_device_location() to update the location of the UPI and
M3UPI in the pre-defined table.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Michael Petlan <mpetlan@redhat.com>
Link: https://lore.kernel.org/r/20230112200105.733466-5-kan.liang@linux.intel.com
arch/x86/events/intel/uncore.c
arch/x86/events/intel/uncore.h
arch/x86/events/intel/uncore_discovery.h
arch/x86/events/intel/uncore_snbep.c