compiler.h: add READ_ONCE/WRITE_ONCE macro
These macros are needed to make sure the compiler does not optimize away atomic constructs such as "while (!READ_ONCE(foo))" loops that do not modify foo within the loop Also move the barrier() define where it belongs while we are here, it is needed for READ_ONCE/WRITE_ONCE and including ihk/cpu.h here causes include loops Change-Id: Ia533a849ed674719ccbc0495be47d22a3c47b8f8
This commit is contained in:
committed by
Masamichi Takagi
parent
13e71ac9dc
commit
3e3ccf377c
@ -25,8 +25,6 @@ void cpu_safe_halt(void);
|
||||
void cpu_restore_interrupt(unsigned long);
|
||||
void cpu_pause(void);
|
||||
|
||||
#define barrier() arch_barrier()
|
||||
|
||||
unsigned long cpu_disable_interrupt_save(void);
|
||||
|
||||
struct ihk_mc_interrupt_handler {
|
||||
|
||||
Reference in New Issue
Block a user