2014-02-13 6:33 GMT+01:00 <kallisti5@xxxxxxxxxxx>: > static inline void > memory_write_barrier_inline(void) > { > - // TODO Only ArmV7+? > - asm volatile("dsb sy" : : : "memory"); > + __sync_synchronize(); > } This can be relaxed for ARMv7 as it provides a proper write barrier (dmb st). For ARMv5 (and earlier) __sync_synchronize() causes GCC to emit a call to a helper functions which we don't have (and don't need) in the kernel. On uniprocessor architectures memory_{full, read, write}_barrier_inline() do not have to be anything more than just a simple compiler barrier. #ifdef would be helpful. Paweł