ARM: perf: add type field to struct arm_pmu
authorMark Rutland <mark.rutland@arm.com>
Mon, 6 Jun 2011 09:37:50 +0000 (10:37 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2011 09:50:08 +0000 (10:50 +0100)
commit7ae18a5717cbbf1879bdd5b66d7009a9958e5aef
tree877bd254703c985de0db15df76a2bf3ead1ea06f
parent0f78d2d5ccf72ec834da6901886a40fd8e3b7615
ARM: perf: add type field to struct arm_pmu

Currently, the ARM perf code assumes all PMUs it will handle are
CPU PMUs, having ARM_PMU_DEVICE_CPU hardcoded when reserving or
releasing hardware. This means that currently, the ARM perf code can't
support system PMUs.

This patch adds a 'type' field to struct arm_pmu, which allows the code
to reserve & release the hardware regardless of the PMU type.

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