提交 a2391b35 编写于 作者: M Madhavan Srinivasan 提交者: Michael Ellerman

powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags()

Cleanup to use is_kernel_addr macro.
Signed-off-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 78a16d9f
...@@ -248,7 +248,7 @@ static inline u32 perf_get_misc_flags(struct pt_regs *regs) ...@@ -248,7 +248,7 @@ static inline u32 perf_get_misc_flags(struct pt_regs *regs)
*/ */
if (ppmu->flags & PPMU_NO_SIPR) { if (ppmu->flags & PPMU_NO_SIPR) {
unsigned long siar = mfspr(SPRN_SIAR); unsigned long siar = mfspr(SPRN_SIAR);
if (siar >= PAGE_OFFSET) if (is_kernel_addr(siar))
return PERF_RECORD_MISC_KERNEL; return PERF_RECORD_MISC_KERNEL;
return PERF_RECORD_MISC_USER; return PERF_RECORD_MISC_USER;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册