summaryrefslogtreecommitdiff
path: root/arch/avr32
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2011-08-11 15:31:31 +0200
committerSteven Rostedt <rostedt@goodmis.org>2015-06-18 18:16:03 -0400
commit7be67fb433a07e27820141e728d6d227c3a08861 (patch)
treef2e97d8c3a730e229df91a0e1593c7d16939e1b9 /arch/avr32
parent2026d111f98d18a64cac1c8e2aba0c1c945b5d4a (diff)
downloadlinux-rt-7be67fb433a07e27820141e728d6d227c3a08861.tar.gz
mm: pagefault_disabled()
Wrap the test for pagefault_disabled() into a helper, this allows us to remove the need for current->pagefault_disabled on !-rt kernels. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/n/tip-3yy517m8zsi9fpsf14xfaqkw@git.kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'arch/avr32')
-rw-r--r--arch/avr32/mm/fault.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/avr32/mm/fault.c b/arch/avr32/mm/fault.c
index ddb8290e8378..8a7fb9343cbf 100644
--- a/arch/avr32/mm/fault.c
+++ b/arch/avr32/mm/fault.c
@@ -81,8 +81,7 @@ asmlinkage void do_page_fault(unsigned long ecr, 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 || regs->sr & SYSREG_BIT(GM) ||
- current->pagefault_disabled)
+ if (!mm || regs->sr & SYSREG_BIT(GM) || pagefault_disabled())
goto no_context;
local_irq_enable();