ARM: perf: refactor event mapping
authorMark Rutland <mark.rutland@arm.com>
Thu, 28 Apr 2011 14:47:10 +0000 (15:47 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2011 09:50:09 +0000 (10:50 +0100)
Currently mapping an event type to a hardware configuration value
depends on the data being pointed to from struct arm_pmu. These fields
(cache_map, event_map, raw_event_mask) are currently specific to CPU
PMUs, and do not serve the general case well.

This patch replaces the event map pointers on struct arm_pmu with a new
'map_event' function pointer. Small shim functions are used to reuse
the existing common code.

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>

No differences found