Dave Hylands wrote:
> The wmb call itself doesn't do anything. It's just a function call to
> a function that does nothing. What's important, is that the compiler
> will not reorder statements across a function call.
Thanks Dave, I didn't know that one.
I was confused because asm/system.h suggests that wmb() actually
does something on some ARM CPUs (probably the ones which try to
reorder writes regardless of what the compiler does).
#if __LINUX_ARM_ARCH__ >= 6
#define mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \
: : "r" (0) : "memory")
#define mb() __asm__ __volatile__ ("" : : : "memory")
#define rmb() mb()
#define wmb() mb()