ARM: perf: index ARMv7 event counters starting from zero
authorWill Deacon <will.deacon@arm.com>
Tue, 19 Jul 2011 21:25:55 +0000 (22:25 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2011 09:18:00 +0000 (10:18 +0100)
commitc691bb6249b25104fcb6dad31bd772c139ce4a50
tree0bcff4d0b191d91ab6738aa3a3120a3cc5425b17
parent25e29c7c0f4fcbe911b77a69f015bd6424cedcd0
ARM: perf: index ARMv7 event counters starting from zero

The current ARMv7 PMU backend indexes event counters from two, with
index zero being reserved and index one being used to represent the
cycle counter.

This patch tidies up the code by indexing from one instead (with zero
for the cycle counter). This allows us to remove many of the accessor
macros along with the counter enumeration and makes the code much more
readable.

Acked-by: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/kernel/perf_event_v7.c