android_kernel_samsung_a7y1.../arch/x86/kernel/cpu
Kim Phillips 6a133772dd perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag
[ Upstream commit f967140dfb7442e2db0868b03b961f9c59418a1b ]

Enable the sampling check in kernel/events/core.c::perf_event_open(),
which returns the more appropriate -EOPNOTSUPP.

BEFORE:

  $ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true
  Error:
  The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (l3_request_g1.caching_l3_cache_accesses).
  /bin/dmesg | grep -i perf may provide additional information.

With nothing relevant in dmesg.

AFTER:

  $ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true
  Error:
  l3_request_g1.caching_l3_cache_accesses: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat'

Fixes: c43ca5091a37 ("perf/x86/amd: Add support for AMD NB and L2I "uncore" counters")
Signed-off-by: Kim Phillips <kim.phillips@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20200311191323.13124-1-kim.phillips@amd.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 14:13:32 +02:00
..
mcheck x86/mce/amd: Fix kobject lifetime 2020-04-07 14:03:26 +02:00
microcode
mtrr
amd.c x86/CPU/AMD: Clear RDRAND CPUID bit on AMD family 15h/16h 2020-04-06 21:32:57 +02:00
bugs.c x86/speculation: Fix redundant MDS mitigation message 2020-04-07 12:37:10 +02:00
centaur.c
common.c x86/bugs: Add ITLB_MULTIHIT bug infrastructure 2020-04-07 12:00:26 +02:00
cpu.h x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default 2020-04-07 12:00:06 +02:00
cyrix.c x86/CPU: Use correct macros for Cyrix calls 2020-04-07 12:29:09 +02:00
hypervisor.c
intel_cacheinfo.c
intel_pt.h
intel.c x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default 2020-04-07 12:00:06 +02:00
Makefile x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default 2020-04-07 12:00:06 +02:00
match.c
mkcapflags.sh x86/build: Add 'set -e' to mkcapflags.sh to delete broken capflags.c 2020-04-06 19:55:21 +02:00
mshyperv.c
perf_event_amd_ibs.c perf/x86/amd/ibs: Fix reading of the IBS OpData register and thus precise RIP validity 2020-04-07 11:58:30 +02:00
perf_event_amd_iommu.c
perf_event_amd_iommu.h
perf_event_amd_uncore.c perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag 2020-04-07 14:13:32 +02:00
perf_event_amd.c
perf_event_intel_bts.c
perf_event_intel_cqm.c
perf_event_intel_cstate.c
perf_event_intel_ds.c
perf_event_intel_lbr.c
perf_event_intel_pt.c
perf_event_intel_rapl.c
perf_event_intel_uncore_nhmex.c
perf_event_intel_uncore_snb.c
perf_event_intel_uncore_snbep.c
perf_event_intel_uncore.c
perf_event_intel_uncore.h
perf_event_intel.c perf/x86/intel: Allow PEBS multi-entry in watermark mode 2020-04-06 19:01:49 +02:00
perf_event_knc.c
perf_event_msr.c
perf_event_p4.c
perf_event_p6.c
perf_event.c
perf_event.h
perfctr-watchdog.c
powerflags.c
proc.c
rdrand.c
scattered.c
topology.c
transmeta.c
tsx.c x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR 2020-04-07 13:49:15 +02:00
umc.c
vmware.c