ARM: perf-events: fix v7 event selection mask
Subsystems (3)
PATCH 1/1 ARM: perf-events: fix v7 event selection mask
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.
--- arch/arm/kernel/perf_event.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/kernel/perf_event.c +1 -1
@@ -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
Signature · 1 line
1.6.3.3
PATCH 1/1 ARM: perf-events: fix v7 event selection mask
Will,
Quoted 4 lines · On Thursday 25 February 2010 19:18:31 Will Deacon wrote:
The event selection mask for ARMv7 cores [
ARMV7_EVTSEL_MASK] is incorrectly set to0x7f. 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.
Good catch! It is a left over from the Cortex-A8 only code. Cortex-A9 introduces more events.
Thanks,
Jean
Quoted 23 lines
This patch sets the event selection mask to the correct value of
0xff.Cc Jean Pihet <[email protected]>Signed-off-by Will Deacon <[email protected]>--- arch/arm/kernel/perf_event.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/kernel/perf_event.c +1
-1@@ -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