powerpc/perf: use is_kernel_addr macro in perf_get_misc_flags()
authorMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Sat, 24 Dec 2016 06:05:49 +0000 (11:35 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 17 Feb 2017 10:48:55 +0000 (21:48 +1100)
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>
arch/powerpc/perf/core-book3s.c

index 87d17a1f71688753cf24372676e4e76b4cf7b92a..595dd718ea8718b010fed1ca5c08f5f121f674c0 100644 (file)
@@ -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;
        }