mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 09:56:00 +00:00
powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags()
Cleanup to use is_kernel_addr macro. Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
78a16d9fc1
commit
a2391b35f1
@ -248,7 +248,7 @@ static inline u32 perf_get_misc_flags(struct pt_regs *regs)
|
||||
*/
|
||||
if (ppmu->flags & PPMU_NO_SIPR) {
|
||||
unsigned long siar = mfspr(SPRN_SIAR);
|
||||
if (siar >= PAGE_OFFSET)
|
||||
if (is_kernel_addr(siar))
|
||||
return PERF_RECORD_MISC_KERNEL;
|
||||
return PERF_RECORD_MISC_USER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user