linux_dsm_epyc7002/arch/x86/events/intel
Kan Liang 9e63a7894f perf/x86/intel/uncore: Add Node ID mask
Some PCI uncore PMUs cannot be registered on an 8-socket system (HPE
Superdome Flex).

To understand which Socket the PCI uncore PMUs belongs to, perf retrieves
the local Node ID of the uncore device from CPUNODEID(0xC0) of the PCI
configuration space, and the mapping between Socket ID and Node ID from
GIDNIDMAP(0xD4). The Socket ID can be calculated accordingly.

The local Node ID is only available at bit 2:0, but current code doesn't
mask it. If a BIOS doesn't clear the rest of the bits, an incorrect Node ID
will be fetched.

Filter the Node ID by adding a mask.

Reported-by: Song Liu <songliubraving@fb.com>
Tested-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@vger.kernel.org> # v3.7+
Fixes: 7c94ee2e09 ("perf/x86: Add Intel Nehalem and Sandy Bridge-EP uncore support")
Link: https://lkml.kernel.org/r/1548600794-33162-1-git-send-email-kan.liang@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-02-04 08:44:43 +01:00
..
bts.c x86: Fix various typos in comments 2018-12-03 10:49:13 +01:00
core.c x86: Fix various typos in comments 2018-12-03 10:49:13 +01:00
cstate.c x86/cpu: Sanitize FAM6_ATOM naming 2018-10-02 10:14:32 +02:00
ds.c x86: Fix various typos in comments 2018-12-03 10:49:13 +01:00
knc.c
lbr.c perf/x86/intel: Add support/quirk for the MISPREDICT bit on Knights Landing CPUs 2018-09-10 10:03:01 +02:00
Makefile
p4.c x86: Fix various typos in comments 2018-12-03 10:49:13 +01:00
p6.c
pt.c perf/x86/intel/pt: add new capability for Intel PT 2018-12-21 11:28:33 +01:00
pt.h perf/x86/intel/pt: Export pt_cap_get() 2018-12-21 11:28:32 +01:00
rapl.c x86/cpu: Sanitize FAM6_ATOM naming 2018-10-02 10:14:32 +02: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: Support CoffeeLake 8th CBOX 2018-11-12 05:03:26 +01:00
uncore_snbep.c perf/x86/intel/uncore: Add Node ID mask 2019-02-04 08:44:43 +01:00
uncore.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
uncore.h perf/x86/intel/uncore: Support CoffeeLake 8th CBOX 2018-11-12 05:03:26 +01:00