Skip to contentSkip to conversation

powerpc/perf: Fix perf_get_data_addr() for power9 DD1

PATCH Applied Madhavan Srinivasan 2 participants 2 messages Feb 20, 2017 – Mar 14, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/perf: Fix perf_get_data_addr() for power9 DD1

Power9 DD1 do not support PMU_HAS_SIER flag and sdsync in perf_get_data_addr() defaults to MMCRA_SDSYNC which is wrong. Since power9 MMCRA does not support SDSYNC bit, patch includes PPMU_NO_SIAR flag to the check and set the sdsync with MMCRA_SAMPLE_ENABLE;

---
 arch/powerpc/perf/core-book3s.c | 2 ++
 1 file changed, 2 insertions(+)
arch/powerpc/perf/core-book3s.c +2 -0
index 270eb9b74e2e..e9e6dfff032f 100644
@@ -183,6 +183,8 @@ static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp)
 			sdsync = POWER7P_MMCRA_SDAR_VALID;
 		else if (ppmu->flags & PPMU_ALT_SIPR)
 			sdsync = POWER6_MMCRA_SDSYNC;
+		else if (ppmu->flags & PPMU_NO_SIAR)
+			sdsync = MMCRA_SAMPLE_ENABLE;
 		else
 			sdsync = MMCRA_SDSYNC;
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 7 lines · Madhavan Srinivasan

Power9 DD1 do not support PMU_HAS_SIER flag and sdsync in perf_get_data_addr() defaults to MMCRA_SDSYNC which is wrong. Since power9 MMCRA does not support SDSYNC bit, patch includes PPMU_NO_SIAR flag to the check and set the sdsync with MMCRA_SAMPLE_ENABLE;

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/f04d108029063a8a67528a88449c41

cheers