X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Farch%2Fppc.h;fp=urcu%2Farch%2Fppc.h;h=2fcbf5660958a12d2ad6dd957838ed73da4f2bec;hp=048b217392cc7cd471647625ca1dd128e6627e00;hb=e62b2f86c5ec06ed41d33ed578e66fad426ff215;hpb=0174d10df0bd3a6b1a1e4eb3601476b0536d5dfc diff --git a/urcu/arch/ppc.h b/urcu/arch/ppc.h index 048b217..2fcbf56 100644 --- a/urcu/arch/ppc.h +++ b/urcu/arch/ppc.h @@ -32,6 +32,12 @@ extern "C" { /* Include size of POWER5+ L3 cache lines: 256 bytes */ #define CAA_CACHE_LINE_SIZE 256 +#ifdef __NO_LWSYNC__ +#define LWSYNC_OPCODE "sync\n" +#else +#define LWSYNC_OPCODE "lwsync\n" +#endif + /* * Use sync for all cmm_mb/rmb/wmb barriers because lwsync does not * preserve ordering of cacheable vs. non-cacheable accesses, so it @@ -48,8 +54,8 @@ extern "C" { * Therefore, use it for barriers ordering accesses to cacheable memory * only. */ -#define cmm_smp_rmb() asm volatile("lwsync":::"memory") -#define cmm_smp_wmb() asm volatile("lwsync":::"memory") +#define cmm_smp_rmb() asm volatile(LWSYNC_OPCODE:::"memory") +#define cmm_smp_wmb() asm volatile(LWSYNC_OPCODE:::"memory") #define mftbl() \ ({ \