linux_dsm_epyc7002/arch
Kim Phillips 16f4641166 perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs
The following commit:

  d7cbbe49a9 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events")

enables L3 PMC events for all threads and slices by writing 1's in
'ChL3PmcCfg' (L3 PMC PERF_CTL) register fields.

Those bitfields overlap with high order event select bits in the Data
Fabric PMC control register, however.

So when a user requests raw Data Fabric events (-e amd_df/event=0xYYY/),
the two highest order bits get inadvertently set, changing the counter
select to events that don't exist, and for which no counts are read.

This patch changes the logic to write the L3 masks only when dealing
with L3 PMC counters.

AMD Family 16h and below Northbridge (NB) counters were not affected.

Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@vger.kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Gary Hook <Gary.Hook@amd.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Liska <mliska@suse.cz>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Pu Wen <puwen@hygon.cn>
Cc: Stephane Eranian <eranian@google.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Fixes: d7cbbe49a9 ("perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events")
Link: https://lkml.kernel.org/r/20190628215906.4276-1-kim.phillips@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-07-13 11:21:26 +02:00
..
alpha alpha: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
arc It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
arm Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
arm64 arm64: move jump_label_init() before parse_early_param() 2019-07-12 11:05:46 -07:00
c6x Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2019-07-10 21:42:03 -07:00
csky csky: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
h8300 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2019-07-10 21:42:03 -07:00
hexagon Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-07-08 21:48:15 -07:00
ia64 TTY / Serial driver updates for 5.3-rc1 2019-07-11 15:38:21 -07:00
m68k Merge branch 'akpm' (patches from Andrew) 2019-07-12 11:40:28 -07:00
microblaze clone3-v5.3 2019-07-11 10:09:44 -07:00
mips mips: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
nds32 nds32: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
nios2 nios2: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
openrisc It's been a relatively busy cycle for docs: 2019-07-09 12:34:26 -07:00
parisc parisc: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
powerpc Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
riscv riscv: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
s390 mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP 2019-07-12 11:05:44 -07:00
sh Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
sparc mm: rename CONFIG_HAVE_GENERIC_GUP to CONFIG_HAVE_FAST_GUP 2019-07-12 11:05:44 -07:00
um um: switch to generic version of pte allocation 2019-07-12 11:05:45 -07:00
unicore32 unicore32: switch to generic version of pte allocation 2019-07-12 11:05:46 -07:00
x86 perf/x86/amd/uncore: Do not set 'ThreadMask' and 'SliceMask' for non-L3 PMCs 2019-07-13 11:21:26 +02:00
xtensa clone3-v5.3 2019-07-11 10:09:44 -07:00
.gitignore
Kconfig Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-16 11:00:20 -07:00