ARM: 5960/1: ARM: perf-events: fix v7 event selection mask
authorWill Deacon <will.deacon@arm.com>
Fri, 26 Feb 2010 09:46:15 +0000 (10:46 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 13 Mar 2010 10:50:29 +0000 (10:50 +0000)
The event selection mask for ARMv7 cores [ARMV7_EVTSEL_MASK]
is incorrectly set to 0x7f. This means that the top bit of an
event ID is ignored, so counting branch misses (id=0x10) and
ISBs (id=0x90) give the same results.

This patch sets the event selection mask to the correct value
of 0xff.

Signed-off-by: Jean Pihet <jpihet@mvista.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/perf_event.c

index b44d15948b56e3a0f70efba47bec30d217a09e4e..c45a155a73dc993cc3250bb3326abff82a3487ef 100644 (file)
@@ -1625,7 +1625,7 @@ enum armv7_counters {
 /*
  * EVTSEL: Event selection reg
  */
-#define        ARMV7_EVTSEL_MASK       0x7f            /* Mask for writable bits */
+#define        ARMV7_EVTSEL_MASK       0xff            /* Mask for writable bits */
 
 /*
  * SELECT: Counter selection reg