ARM: perf: fix ARMv7 EVTYPE_MASK to include NSH bit
Subsystems (3)
PATCH 1/2 ARM: perf: fix ARMv7 EVTYPE_MASK to include NSH bit
Masked out PMXEVTYPER.NSH means that we can't enable profiling at PL2, regardless of the settings in the HDCR.
This patch fixes the broken mask.
Cc <[email protected]>
Reported-by Christoffer Dall <[email protected]>
Signed-off-by Will Deacon <[email protected]>
--- arch/arm/kernel/perf_event_v7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/perf_event_v7.c +1 -1
@@ -774,7 +774,7 @@ static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]/* * PMXEVTYPER: Event selection reg */ -#define ARMV7_EVTYPE_MASK 0xc00000ff/* Mask for writable bits */ +#define ARMV7_EVTYPE_MASK 0xc80000ff/* Mask for writable bits */ #define ARMV7_EVTYPE_EVENT 0xff/* Mask for EVENT bits */ /*
Signature · 1 line
1.8.0
PATCH 2/2 ARM: perf: remove erroneous semicolon from event initialisation
From: Chen Gang <[email protected]>
Commit 9dcbf466559f ("ARM: perf: simplify __hw_perf_event_init err handling") tidied up the error handling code for perf event initialisation on ARM, but a copy-and-paste error left a dangling semicolon at the end of an if statement.
This patch removes the broken semicolon, restoring the old group validation semantics.
Cc Mark Rutland <[email protected]>
Acked-by Dirk Behme <[email protected]>
Signed-off-by Chen Gang <[email protected]>
Signed-off-by Will Deacon <[email protected]>
--- arch/arm/kernel/perf_event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/perf_event.c +1 -1
@@ -400,7 +400,7 @@ __hw_perf_event_init(struct perf_event *event) }if (event->group_leader != event) { -if (validate_group (event) !=0 ); +if (validate_group (event) !=0 )return -EINVAL ; }
Signature · 1 line
1.8.0