public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH tip/cor/rcu] remove redundant ACCESS_ONCE definition from rcupreempt.c
@ 2008-08-17 19:50 Paul E. McKenney
  2008-08-18  7:45 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Paul E. McKenney @ 2008-08-17 19:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo, akpm, dipankar, josht, rostedt, dvhltc, niv

Remove the redundant definition of ACCESS_ONCE() from rcupreempt.c in
favor of the one in compiler.h.  Also merge the comment header from
rcupreempt.c's definition into that in compiler.h.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---

 include/linux/compiler.h |    4 +++-
 kernel/rcupreempt.c      |    8 --------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index c8bd2da..8322141 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -190,7 +190,9 @@ extern void __chk_io_ptr(const volatile void __iomem *);
  * ACCESS_ONCE() in different C statements.
  *
  * This macro does absolutely -nothing- to prevent the CPU from reordering,
- * merging, or refetching absolutely anything at any time.
+ * merging, or refetching absolutely anything at any time.  Its main intended
+ * use is to mediate communication between process-level code and irq/NMI
+ * handlers, all running on the same CPU.
  */
 #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
 
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c
index 2782793..ca4bbbe 100644
--- a/kernel/rcupreempt.c
+++ b/kernel/rcupreempt.c
@@ -59,14 +59,6 @@
 #include <linux/rcupreempt_trace.h>
 
 /*
- * Macro that prevents the compiler from reordering accesses, but does
- * absolutely -nothing- to prevent CPUs from reordering.  This is used
- * only to mediate communication between mainline code and hardware
- * interrupt and NMI handlers.
- */
-#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
-
-/*
  * PREEMPT_RCU data structures.
  */
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH tip/cor/rcu] remove redundant ACCESS_ONCE definition from rcupreempt.c
  2008-08-17 19:50 [PATCH tip/cor/rcu] remove redundant ACCESS_ONCE definition from rcupreempt.c Paul E. McKenney
@ 2008-08-18  7:45 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-08-18  7:45 UTC (permalink / raw)
  To: Paul E. McKenney
  Cc: linux-kernel, akpm, dipankar, josht, rostedt, dvhltc, niv


* Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

> Remove the redundant definition of ACCESS_ONCE() from rcupreempt.c in 
> favor of the one in compiler.h.  Also merge the comment header from 
> rcupreempt.c's definition into that in compiler.h.

applied to tip/core/rcu, thanks Paul!

	Ingo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-18  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-17 19:50 [PATCH tip/cor/rcu] remove redundant ACCESS_ONCE definition from rcupreempt.c Paul E. McKenney
2008-08-18  7:45 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox