Skip to content

Commit

Permalink
ARM: 5960/1: ARM: perf-events: fix v7 event selection mask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Will Deacon authored and Russell King committed Mar 13, 2010
1 parent ddee87f commit d10fca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d10fca9

Please sign in to comment.