Merge branch 'timers-nohz-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / arch / xtensa / mm / fault.c
index 9e3571a6535c3b1bbc8535195ee40405fe9c42c0..83a44a33cfa11221f99ba5f8d836e02a0c4c9f92 100644 (file)
 #include <linux/mm.h>
 #include <linux/module.h>
 #include <linux/hardirq.h>
+#include <linux/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/cacheflush.h>
 #include <asm/hardirq.h>
-#include <asm/uaccess.h>
 #include <asm/pgalloc.h>
 
 DEFINE_PER_CPU(unsigned long, asid_cache) = ASID_USER_FIRST;
@@ -57,7 +57,7 @@ void do_page_fault(struct pt_regs *regs)
        /* If we're in an interrupt or have no user
         * context, we must not take the fault..
         */
-       if (in_atomic() || !mm) {
+       if (faulthandler_disabled() || !mm) {
                bad_page_fault(regs, address, SIGSEGV);
                return;
        }