Skip to contentSkip to conversation

ARM: perf: fix ARMv7 EVTYPE_MASK to include NSH bit

PATCH New Will Deacon 1 participant 2 messages Feb 25, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 arch/arm/kernel/perf_event_v7.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/perf_event_v7.c +1 -1
index 8c79a9e..039cffb 100644
@@ -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
#1 lore raw

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.

---
 arch/arm/kernel/perf_event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/perf_event.c +1 -1
index 31e0eb3..a892067 100644
@@ -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