Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / arch / powerpc / oprofile / backtrace.c
index 6adf55f..ecc66d5 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/oprofile.h>
 #include <linux/sched.h>
 #include <asm/processor.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <asm/compat.h>
 #include <asm/oprofile_impl.h>
 
@@ -105,6 +105,7 @@ void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth)
                        first_frame = 0;
                }
        } else {
+               pagefault_disable();
 #ifdef CONFIG_PPC64
                if (!is_32bit_task()) {
                        while (depth--) {
@@ -113,7 +114,7 @@ void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth)
                                        break;
                                first_frame = 0;
                        }
-
+                       pagefault_enable();
                        return;
                }
 #endif
@@ -124,5 +125,6 @@ void op_powerpc_backtrace(struct pt_regs * const regs, unsigned int depth)
                                break;
                        first_frame = 0;
                }
+               pagefault_enable();
        }
 }