arm: perf: treat PMUs as CPU affine
authorMark Rutland <mark.rutland@arm.com>
Wed, 13 May 2015 16:12:25 +0000 (17:12 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 27 May 2015 15:12:36 +0000 (16:12 +0100)
commitcc88116da0d18b8292f5437dbc0c4683c8a34ac1
tree532e7eeeed93572614eb41b497373e9a1c07a763
parent64d0d3943e14653fcfd5f9b3bd585bc77fa053df
arm: perf: treat PMUs as CPU affine

In multi-cluster systems, the PMUs can be different across clusters, and
so our logical PMU may not be able to schedule events on all CPUs.

This patch adds a cpumask to encode which CPUs a PMU driver supports
controlling events for, and limits the driver to scheduling events on
those CPUs, and enabling and disabling the physical PMUs on those CPUs.
The cpumask is built based on the interrupt-affinity property, and in
the absence of such a property a homogenous system is assumed.

Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/pmu.h
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_cpu.c