linux/drivers/perf
Andrew Murray a66b0010f8 perf/drivers: Strengthen exclusion checks with PERF_PMU_CAP_NO_EXCLUDE
For drivers that do not support context exclusion let's advertise the
PERF_PMU_CAP_NO_EXCLUDE capability. This ensures that perf will
prevent us from handling events where any exclusion flags are set.
Let's also remove the now unnecessary check for exclusion flags.

This change means that qcom_{l2|l3}_pmu will now also indicate that
they do not support exclude_{host|guest} and that xgene_pmu does
not also support exclude_idle and exclude_hv.

Note that for qcom_l2_pmu we now implictly return -EINVAL instead
of -EOPNOTSUPP. This change will result in the perf userspace
utility retrying the perf_event_open system call with fallback
event attributes that do not fail.

Signed-off-by: Andrew Murray <andrew.murray@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: robin.murphy@arm.com
Cc: suzuki.poulose@arm.com
Link: https://lkml.kernel.org/r/1547128414-50693-9-git-send-email-andrew.murray@arm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-01-21 11:01:25 +01:00
..
hisilicon For drivers that do not support context exclusion let's advertise the 2019-01-21 11:01:24 +01:00
arm_dsu_pmu.c For drivers that do not support context exclusion let's advertise the 2019-01-21 11:01:24 +01:00
arm_pmu_acpi.c arm_pmu: acpi: request IRQs up-front 2018-02-20 11:34:54 +00:00
arm_pmu_platform.c perf: Convert to using %pOFn instead of device_node.name 2018-10-01 11:33:17 +01:00
arm_pmu.c perf/core, arch/arm: Use PERF_PMU_CAP_NO_EXCLUDE conditionally 2019-01-21 11:01:22 +01:00
arm_spe_pmu.c perf: arm_spe: handle devm_kasprintf() failure 2018-11-29 16:29:16 +00:00
arm-cci.c For drivers that do not support context exclusion let's advertise the 2019-01-21 11:01:24 +01:00
arm-ccn.c For drivers that do not support context exclusion let's advertise the 2019-01-21 11:01:24 +01:00
Kconfig drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver 2018-12-06 13:03:17 +00:00
Makefile drivers/perf: Add Cavium ThunderX2 SoC UNCORE PMU driver 2018-12-06 13:03:17 +00:00
qcom_l2_pmu.c perf/drivers: Strengthen exclusion checks with PERF_PMU_CAP_NO_EXCLUDE 2019-01-21 11:01:25 +01:00
qcom_l3_pmu.c perf/drivers: Strengthen exclusion checks with PERF_PMU_CAP_NO_EXCLUDE 2019-01-21 11:01:25 +01:00
thunderx2_pmu.c For drivers that do not support context exclusion let's advertise the 2019-01-21 11:01:24 +01:00
xgene_pmu.c perf/drivers: Strengthen exclusion checks with PERF_PMU_CAP_NO_EXCLUDE 2019-01-21 11:01:25 +01:00