]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/powerpc/perf/core-book3s.c
csky: Minimize defconfig to support buildroot config.fragment
[linux.git] / arch / powerpc / perf / core-book3s.c
index 48604625ab31d54692b428d824bb981dbed92753..3086055bf681f0b6f9a8db88553031b16eb23850 100644 (file)
@@ -415,7 +415,6 @@ static void power_pmu_sched_task(struct perf_event_context *ctx, bool sched_in)
 static __u64 power_pmu_bhrb_to(u64 addr)
 {
        unsigned int instr;
-       int ret;
        __u64 target;
 
        if (is_kernel_addr(addr)) {
@@ -426,13 +425,8 @@ static __u64 power_pmu_bhrb_to(u64 addr)
        }
 
        /* Userspace: need copy instruction here then translate it */
-       pagefault_disable();
-       ret = __get_user_inatomic(instr, (unsigned int __user *)addr);
-       if (ret) {
-               pagefault_enable();
+       if (probe_user_read(&instr, (unsigned int __user *)addr, sizeof(instr)))
                return 0;
-       }
-       pagefault_enable();
 
        target = branch_target(&instr);
        if ((!target) || (instr & BRANCH_ABSOLUTE))