X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=arch%2Fmips%2Finclude%2Fasm%2Fbarrier.h;h=e1aa4e4c2984230e2353760a4b9863387d90ad24;hb=47933ad41a86a4a9b50bed7c9b9bd2ba242aac63;hp=f26d8e1bf3c37575b4b42144282587caaa1c6a3f;hpb=29e248829dc7d44248c69bbd5d40eca152a50cab;p=~andy%2Flinux diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h index f26d8e1bf3c..e1aa4e4c298 100644 --- a/arch/mips/include/asm/barrier.h +++ b/arch/mips/include/asm/barrier.h @@ -180,4 +180,19 @@ #define nudge_writes() mb() #endif +#define smp_store_release(p, v) \ +do { \ + compiletime_assert_atomic_type(*p); \ + smp_mb(); \ + ACCESS_ONCE(*p) = (v); \ +} while (0) + +#define smp_load_acquire(p) \ +({ \ + typeof(*p) ___p1 = ACCESS_ONCE(*p); \ + compiletime_assert_atomic_type(*p); \ + smp_mb(); \ + ___p1; \ +}) + #endif /* __ASM_BARRIER_H */