aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2011-03-10 21:47:31 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-03-11 06:23:08 -0500
commit522d7decc0370070448a8c28982c8dfd8970489e (patch)
tree0f964a23a28b9dcf2d1fad3096f549c93c68b605 /arch
parentc0c9ed15042ceac7c485813012a0a97316101b57 (diff)
futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic()
kernel/futex.c disables page faults before calling futex_atomic_cmpxchg_inatomic(), so there is no need to do it again within that function. Signed-off-by: Michel Lespinasse <walken@google.com> Cc: Darren Hart <darren@dvhart.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Matt Turner <mattst88@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: David Howells <dhowells@redhat.com> Cc: Tony Luck <tony.luck@intel.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <20110311024731.GB26122@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/futex.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index b33fe7065b38..7133a8620830 100644
--- a/arch/arm/include/asm/futex.h
+++ b/arch/arm/include/asm/futex.h
@@ -95,7 +95,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
95 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) 95 if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
96 return -EFAULT; 96 return -EFAULT;
97 97
98 pagefault_disable(); /* implies preempt_disable() */ 98 /* Note that preemption is disabled by futex_atomic_cmpxchg_inatomic
99 * call sites. */
99 100
100 __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" 101 __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
101 "1: " T(ldr) " %0, [%3]\n" 102 "1: " T(ldr) " %0, [%3]\n"
@@ -115,8 +116,6 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
115 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) 116 : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
116 : "cc", "memory"); 117 : "cc", "memory");
117 118
118 pagefault_enable(); /* subsumes preempt_enable() */
119
120 return val; 119 return val;
121} 120}
122 121