ARM: perf: lock PMU registers per-CPU
authorMark Rutland <mark.rutland@arm.com>
Thu, 28 Apr 2011 09:17:04 +0000 (10:17 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2011 09:50:07 +0000 (10:50 +0100)
commit0f78d2d5ccf72ec834da6901886a40fd8e3b7615
treeda1262d040b2c10d95c6fc313b44e18801bcb4a3
parent1b69beb7684c79673995607939d8acab51056b63
ARM: perf: lock PMU registers per-CPU

Currently, a single lock serialises access to CPU PMU registers. This
global locking is unnecessary as PMU registers are local to the CPU
they monitor.

This patch replaces the global lock with a per-CPU lock. As the lock is
in struct cpu_hw_events, PMUs providing a single cpu_hw_events instance
can be locked globally.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Ashwin Chaugule <ashwinc@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event.c
arch/arm/kernel/perf_event_v6.c
arch/arm/kernel/perf_event_v7.c
arch/arm/kernel/perf_event_xscale.c