]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 17 Aug 2008 19:50:36 +0000 (12:50 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 18 Aug 2008 07:45:22 +0000 (09:45 +0200)
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/compiler.h
kernel/rcupreempt.c

index c8bd2daf95ec51e0f42ad05e6b8c13be1300ce16..8322141ee480c802ee6919d0f13a86218e45bfc4 100644 (file)
@@ -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))
 
index 27827931ca0dd6ca905040955616c970b2e7539d..ca4bbbe04aa4db9d150a503c9025dbe83e0d62a3 100644 (file)
 #include <linux/cpumask.h>
 #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.
  */