Skip to contentSkip to conversation

powerpc/perf: Use SIER_USER_MASK while updating SPRN_SIER for EBB events

PATCH Superseded Athira Rajeev 1 participant 1 message Feb 28, 2020 PowerPC

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/perf: Use SIER_USER_MASK while updating SPRN_SIER for EBB events

commit 330a1eb7775b ("powerpc/perf: Core EBB support for 64-bit book3s") defines user mask for SIER. But this is not used in ebb_switch_out while saving SPR's. Patch fixes this by updating SPRN_SIER with the user mask.

Fixes 330a1eb7775b ("powerpc/perf: Core EBB support for 64-bit book3s")
---
 arch/powerpc/perf/core-book3s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/perf/core-book3s.c +1 -1
index 3086055..48b61cc 100644
@@ -579,7 +579,7 @@ static void ebb_switch_out(unsigned long mmcr0)
 		return;
 
 	current->thread.siar  = mfspr(SPRN_SIAR);
-	current->thread.sier  = mfspr(SPRN_SIER);
+	current->thread.sier  = mfspr(SPRN_SIER) & SIER_USER_MASK;
 	current->thread.sdar  = mfspr(SPRN_SDAR);
 	current->thread.mmcr0 = mmcr0 & MMCR0_USER_MASK;
 	current->thread.mmcr2 = mfspr(SPRN_MMCR2) & MMCR2_USER_MASK;
Signature · 1 line
1.8.3.1