> Date: Mon, 16 May 2016 18:32:53 +1000
> From: Jonathan Gray <[email protected]>
> 
> After consulting an older version of the ARM ARM it seems the cp15
> barriers were introduced with armv6 so just do the compiler hint.

ok kettenis@

> Index: atomic.h
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm/include/atomic.h,v
> retrieving revision 1.14
> diff -u -p -r1.14 atomic.h
> --- atomic.h  25 Apr 2016 08:00:43 -0000      1.14
> +++ atomic.h  16 May 2016 08:31:29 -0000
> @@ -465,6 +465,21 @@ atomic_clearbits_int(volatile unsigned i
>           : "memory", "cc"
>       );
>  }
> +#endif /* CPU_ARMv7 */
> +
> +#if !defined(CPU_ARMv7)
> +
> +#define __membar() do { \
> +     __asm __volatile("" ::: "memory"); \
> +} while (0)
> +
> +#define membar_enter()               __membar()
> +#define membar_exit()                __membar()
> +#define membar_producer()    __membar()
> +#define membar_consumer()    __membar()
> +#define membar_sync()                __membar()
> +
> +#else /* !CPU_ARMv7 */
>  
>  #define __membar(_f) do { __asm __volatile(_f ::: "memory"); } while (0)
>  
> 
> 

Reply via email to