OpenCloudOS-Kernel/arch/x86/events/intel
Kan Liang 6f7f984fa8 perf/x86/uncore: Correct the number of CHAs on EMR
Starting from SPR, the basic uncore PMON information is retrieved from
the discovery table (resides in an MMIO space populated by BIOS). It is
called the discovery method. The existing value of the type->num_boxes
is from the discovery table.

On some SPR variants, there is a firmware bug that makes the value from the
discovery table incorrect. We use the value from the
SPR_MSR_UNC_CBO_CONFIG MSR to replace the one from the discovery table:

   38776cc45e ("perf/x86/uncore: Correct the number of CHAs on SPR")

Unfortunately, the SPR_MSR_UNC_CBO_CONFIG isn't available for the EMR
XCC (Always returns 0), but the above firmware bug doesn't impact the
EMR XCC.

Don't let the value from the MSR replace the existing value from the
discovery table.

Fixes: 38776cc45e ("perf/x86/uncore: Correct the number of CHAs on SPR")
Reported-by: Stephane Eranian <eranian@google.com>
Reported-by: Yunying Sun <yunying.sun@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Yunying Sun <yunying.sun@intel.com>
Link: https://lore.kernel.org/r/20230905134248.496114-1-kan.liang@linux.intel.com
2023-09-05 21:50:21 +02:00
..
Makefile perf/x86/intel/uncore: Parse uncore discovery tables 2021-04-02 10:04:54 +02:00
bts.c perf/x86: Add compiler barrier after updating BTS 2021-09-17 15:08:38 +02:00
core.c Perf events changes for v6.6: 2023-08-28 16:35:01 -07:00
cstate.c x86/cpu: Fix Gracemont uarch 2023-08-09 21:51:06 +02:00
ds.c perf/x86/intel: Add Crestmont PMU 2023-08-09 21:51:07 +02:00
knc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lbr.c perf/x86/lbr: Simplify the exposure check for the LBR_INFO registers 2022-12-27 12:52:07 +01:00
p4.c perf/x86: Make struct p4_event_bind::cntr signed array 2022-11-19 00:56:15 +01:00
p6.c x86/cpu: Rename cpu_data.x86_mask to cpu_data.x86_stepping 2018-02-15 01:15:52 +01:00
pt.c perf/x86/intel/pt: Fix sampling using single range output 2022-11-16 10:12:59 +01:00
pt.h perf/x86/intel/pt: Prevent redundant WRMSRs 2019-11-13 11:06:18 +01:00
uncore.c x86/cpu: Fix Gracemont uarch 2023-08-09 21:51:06 +02:00
uncore.h perf/x86/intel/uncore: Add Meteor Lake support 2023-02-11 12:39:03 +01:00
uncore_discovery.c perf/x86/uncore: Don't WARN_ON_ONCE() for a broken discovery table 2023-01-21 00:06:13 +01:00
uncore_discovery.h perf/x86/uncore: Add a quirk for UPI on SPR 2023-01-21 00:06:13 +01:00
uncore_nhmex.c perf/x86/intel/uncore: Correct fixed counter index check for NHM 2018-05-31 12:36:28 +02:00
uncore_snb.c perf/x86/intel/uncore: Add Meteor Lake support 2023-02-11 12:39:03 +01:00
uncore_snbep.c perf/x86/uncore: Correct the number of CHAs on EMR 2023-09-05 21:50:21 +02:00