linux_dsm_epyc7002/drivers
Mark Rutland 5101ef20f0 perf/arm: Special-case hetereogeneous CPUs
Commit:

  2665784850 ("perf/core: Verify we have a single perf_hw_context PMU")

forcefully prevents multiple PMUs from sharing perf_hw_context, as this
generally doesn't make sense. It is a common bug for uncore PMUs to
use perf_hw_context rather than perf_invalid_context, which this detects.

However, systems exist with heterogeneous CPUs (and hence heterogeneous
HW PMUs), for which sharing perf_hw_context is necessary, and possible
in some limited cases.

To make this work we have to perform some gymnastics, as we did in these
commits:

  66eb579e66 ("perf: allow for PMU-specific event filtering")
  c904e32a69 ("arm: perf: filter unschedulable events")

To allow those systems to work, we must allow PMUs for heterogeneous
CPUs to share perf_hw_context, though we must still disallow sharing
otherwise to detect the common misuse of perf_hw_context.

This patch adds a new PERF_PMU_CAP_HETEROGENEOUS_CPUS for this, updates
the core logic to account for this, and makes use of it in the arm_pmu
code that is used for systems with heterogeneous CPUs. Comments are
added to make the rationale clear and hopefully avoid accidental abuse.

Signed-off-by: Mark Rutland <mark.rutland@arm.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: Catalin Marinas <catalin.marinas@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20160426103346.GA20836@leverpostej
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-05-05 10:13:59 +02:00
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base
bcma
block rbd: report unsupported features to syslog 2016-04-28 10:07:43 +02:00
bluetooth
bus
cdrom
char
clk
clocksource Merge branches 'perf-urgent-for-linus', 'smp-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-04-23 11:45:52 -07:00
connector
cpufreq Merge branch 'pm-cpufreq-fixes' 2016-04-29 14:22:25 +02:00
cpuidle
crypto crypto: talitos - fix AEAD tcrypt tests 2016-04-20 17:42:49 +08:00
dca
devfreq
dio
dma Merge branch 'fix/edma' into fixes 2016-04-16 22:52:03 +05:30
dma-buf
edac EDAC: i7core, sb_edac: Don't return NOTIFY_BAD from mce_decoder callback 2016-04-29 15:43:10 +02:00
eisa
extcon
firewire
firmware Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-04-28 19:54:50 -07:00
fmc
fpga
gpio
gpu Merge branch 'drm-fixes-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-fixes 2016-04-29 14:31:44 +10:00
hid
hsi
hv
hwmon
hwspinlock
hwtracing
i2c i2c: exynos5: Fix possible ABBA deadlock by keeping I2C clock prepared 2016-04-22 15:31:54 +02:00
ide
idle
iio
infiniband Final set of -rc fixes for 4.6 2016-04-29 17:07:54 -07:00
input Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2016-04-23 11:04:26 -07:00
iommu iommu/arm-smmu: Don't allocate resources for bypass domains 2016-04-21 16:47:32 +02:00
ipack
irqchip irqchip/mips-gic: Don't overrun pcpu_masks array 2016-04-21 21:04:29 +02:00
isdn
leds
lguest
lightnvm
macintosh
mailbox
mcb
md dm cache metadata: fix cmd_read_lock() acquiring write lock 2016-04-17 11:24:46 -04:00
media media fixes for v4.6-rc6 2016-04-28 19:44:47 -07:00
memory
memstick
message
mfd
misc powerpc fixes for 4.6 #3 2016-04-29 18:50:08 -07:00
mmc mmc: sunxi: Disable eMMC HS-DDR (MMC_CAP_1_8V_DDR) for Allwinner A80 2016-04-28 11:43:54 +02:00
mtd
net net/mlx4_en: fix spurious timestamping callbacks 2016-04-26 01:13:18 -04:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport
pci PCI updates for v4.6: 2016-04-18 19:52:47 -07:00
pcmcia
perf perf/arm: Special-case hetereogeneous CPUs 2016-05-05 10:13:59 +02:00
phy
pinctrl
platform platform-drivers-x86 for 4.6-3 2016-04-27 08:57:11 -07:00
pnp
power
powercap powercap, perf/x86/intel/rapl: Add PSys support 2016-04-28 10:39:19 +02:00
pps
ps3
ptp
pwm
rapidio rapidio: fix potential NULL pointer dereference 2016-04-28 19:34:04 -07:00
ras
regulator
remoteproc
reset
rpmsg
rtc rtc: ds1307: Use irq when available for wakeup-source device 2016-04-21 23:21:00 +02:00
s390 s390/sclp_ctl: fix potential information leak with /dev/sclp 2016-04-27 09:33:39 +02:00
sbus
scsi cxgbi: fix uninitialized flowi6 2016-04-25 16:20:49 -04:00
sfi
sh
sn
soc
spi
spmi
ssb
staging Final set of -rc fixes for 4.6 2016-04-29 17:07:54 -07:00
target
tc
thermal thermal: use %d to print S32 parameters 2016-04-27 15:54:51 -07:00
thunderbolt
tty devpts: more pty driver interface cleanups 2016-04-26 15:47:32 -07:00
uio
usb usb: gadget: f_fs: Fix use-after-free 2016-04-20 10:38:06 +03:00
uwb
vfio
vhost
video omapfb: panel-sharp-ls037v7dw01: fix check of gpio_to_desc() return value 2016-04-18 12:18:37 +03:00
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile