From: tip-bot for Michel Lespinasse <walken@google.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@redhat.com, torvalds@linux-foundation.org,
schwidefsky@de.ibm.com, peterz@infradead.org,
cmetcalf@tilera.com, tony.luck@intel.com, ralf@linux-mips.org,
monstr@monstr.eu, linux@arm.linux.org.uk, tglx@linutronix.de,
linux-kernel@vger.kernel.org, hpa@zytor.com, darren@dvhart.com,
lethal@linux-sh.org, davem@davemloft.net, dhowells@redhat.com,
benh@kernel.crashing.org, mattst88@gmail.com,
jejb@parisc-linux.org, walken@google.com
Subject: [tip:core/futexes] futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic()
Date: Fri, 11 Mar 2011 11:31:07 GMT [thread overview]
Message-ID: <tip-522d7decc0370070448a8c28982c8dfd8970489e@git.kernel.org> (raw)
In-Reply-To: <20110311024731.GB26122@google.com>
Commit-ID: 522d7decc0370070448a8c28982c8dfd8970489e
Gitweb: http://git.kernel.org/tip/522d7decc0370070448a8c28982c8dfd8970489e
Author: Michel Lespinasse <walken@google.com>
AuthorDate: Thu, 10 Mar 2011 18:47:31 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 11 Mar 2011 12:23:08 +0100
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>
---
arch/arm/include/asm/futex.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h
index b33fe70..7133a86 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)
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
- pagefault_disable(); /* implies preempt_disable() */
+ /* Note that preemption is disabled by futex_atomic_cmpxchg_inatomic
+ * call sites. */
__asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
"1: " T(ldr) " %0, [%3]\n"
@@ -115,8 +116,6 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
: "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
: "cc", "memory");
- pagefault_enable(); /* subsumes preempt_enable() */
-
return val;
}
next prev parent reply other threads:[~2011-03-11 11:32 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-07 2:11 [PATCH] futex: cmpxchg_futex_value_locked API change Michel Lespinasse
2011-03-07 8:54 ` Martin Schwidefsky
2011-03-07 14:25 ` Chris Metcalf
2011-03-07 21:58 ` Luck, Tony
2011-03-08 20:17 ` Thomas Gleixner
2011-03-09 11:25 ` Michel Lespinasse
2011-03-09 15:04 ` Thomas Gleixner
2011-03-09 15:08 ` Martin Schwidefsky
2011-03-09 22:17 ` Michel Lespinasse
2011-03-09 17:50 ` Darren Hart
2011-03-10 18:55 ` Thomas Gleixner
2011-03-11 2:16 ` Michel Lespinasse
2011-03-11 2:47 ` [PATCH 1/3] futex: do not pagefault_disable in futex_atomic_cmpxchg_inatomic() Michel Lespinasse
2011-03-11 11:31 ` tip-bot for Michel Lespinasse [this message]
2011-03-13 22:49 ` Linus Torvalds
2011-03-14 0:55 ` Darren Hart
2011-03-14 1:15 ` Darren Hart
2011-03-14 9:13 ` Peter Zijlstra
2011-03-14 9:13 ` Thomas Gleixner
2011-03-14 13:56 ` Thomas Gleixner
2011-03-14 20:07 ` Darren Hart
2011-03-14 20:15 ` [tip:core/futexes] futex: Deobfuscate handle_futex_death() tip-bot for Thomas Gleixner
2011-03-14 20:16 ` [tip:core/futexes] arm: Remove bogus comment in futex_atomic_cmpxchg_inatomic() tip-bot for Thomas Gleixner
2011-03-14 9:15 ` [PATCH 1/3] futex: do not pagefault_disable " Michel Lespinasse
2011-03-11 2:48 ` [PATCH 2/3] futex: cmpxchg_futex_value_locked API change Michel Lespinasse
2011-03-11 11:31 ` [tip:core/futexes] futex: Sanitize cmpxchg_futex_value_locked API tip-bot for Michel Lespinasse
2012-03-05 0:01 ` [regression] Re: [PATCH 2/3] " Jonathan Nieder
2012-03-05 23:21 ` Luck, Tony
2012-03-05 23:42 ` Jonathan Nieder
2012-03-08 20:59 ` Émeric Maschino
2012-03-08 21:12 ` Émeric Maschino
2012-04-15 21:35 ` Émeric Maschino
2011-03-11 2:50 ` [PATCH 3/3] futex: fix futex operation types Michel Lespinasse
2011-03-11 11:32 ` [tip:core/futexes] futex: Sanitize futex ops argument types tip-bot for Michel Lespinasse
2011-03-09 11:08 ` [PATCH] futex: cmpxchg_futex_value_locked API change Michal Simek
2011-03-09 12:41 ` David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-522d7decc0370070448a8c28982c8dfd8970489e@git.kernel.org \
--to=walken@google.com \
--cc=benh@kernel.crashing.org \
--cc=cmetcalf@tilera.com \
--cc=darren@dvhart.com \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=hpa@zytor.com \
--cc=jejb@parisc-linux.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mattst88@gmail.com \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=peterz@infradead.org \
--cc=ralf@linux-mips.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome