Skip to content

Commit

Permalink
rcu: remove redundant ACCESS_ONCE definition from rcupreempt.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul E. McKenney authored and Ingo Molnar committed Aug 18, 2008
1 parent cd95851 commit ded00a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
4 changes: 3 additions & 1 deletion include/linux/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
8 changes: 0 additions & 8 deletions kernel/rcupreempt.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@
#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.
*/
Expand Down

0 comments on commit ded00a5

Please sign in to comment.