summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney2008-08-17 21:50:36 +0200
committerIngo Molnar2008-08-18 09:45:22 +0200
commitded00a56e99555c3f4000ef3eebfd5fe0d574565 (patch)
tree384e81f0780de2fb89a82dd341cb24ce2f4364cf
parentrcu: fix classic RCU locking cleanup lockdep problem (diff)
downloadkernel-qcow2-linux-ded00a56e99555c3f4000ef3eebfd5fe0d574565.tar.gz
kernel-qcow2-linux-ded00a56e99555c3f4000ef3eebfd5fe0d574565.tar.xz
kernel-qcow2-linux-ded00a56e99555c3f4000ef3eebfd5fe0d574565.zip
rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c
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>
-rw-r--r--include/linux/compiler.h4
-rw-r--r--kernel/rcupreempt.c8
2 files changed, 3 insertions, 9 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index c8bd2daf95ec..8322141ee480 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 27827931ca0d..ca4bbbe04aa4 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.
*/