ARM: perf: only register a CPU PMU when present
authorMark Rutland <mark.rutland@arm.com>
Wed, 27 Apr 2011 09:31:51 +0000 (10:31 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2011 09:50:00 +0000 (10:50 +0100)
commit48957155f8791964d8567479e6986f88343aba38
tree676a538a8d99cd2864525a4b62789ef203e6075c
parent5f12a761937373d2f9b557d7519e6f1cf738b8f0
ARM: perf: only register a CPU PMU when present

Currently, an "empty" struct pmu is registered as the CPU PMU,
regardless of whether there is a physical PMU. This burdens the
accessor functions with checks to see whether a PMU is actually
present.

This patch changes initialisation to register a PMU only if there is a
supported PMU present, and removes the checks that this change makes
redundant.

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