Skip to content

Commit f04d108

Browse files
Madhavan Srinivasanmpe
authored andcommitted
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; Fixes: 27593d7 ("powerpc/perf: Use MSR to report privilege level on P9 DD1") Signed-off-by: Madhavan Srinivasan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 97ee351 commit f04d108

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/powerpc/perf/core-book3s.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ static inline void perf_get_data_addr(struct pt_regs *regs, u64 *addrp)
188188
sdsync = POWER7P_MMCRA_SDAR_VALID;
189189
else if (ppmu->flags & PPMU_ALT_SIPR)
190190
sdsync = POWER6_MMCRA_SDSYNC;
191+
else if (ppmu->flags & PPMU_NO_SIAR)
192+
sdsync = MMCRA_SAMPLE_ENABLE;
191193
else
192194
sdsync = MMCRA_SDSYNC;
193195

0 commit comments

Comments
 (0)