[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 04/10] xen: arm: consolidate barrier definitions



On Fri, 28 Jun 2013, Ian Campbell wrote:
> These are effectively identical on both 32- and 64-bit.
> 
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>


>  xen/include/asm-arm/arm32/system.h |   16 ----------------
>  xen/include/asm-arm/arm64/system.h |   17 -----------------
>  xen/include/asm-arm/system.h       |   16 ++++++++++++++++
>  3 files changed, 16 insertions(+), 33 deletions(-)
> 
> diff --git a/xen/include/asm-arm/arm32/system.h 
> b/xen/include/asm-arm/arm32/system.h
> index b3736f4..9f233fe 100644
> --- a/xen/include/asm-arm/arm32/system.h
> +++ b/xen/include/asm-arm/arm32/system.h
> @@ -2,22 +2,6 @@
>  #ifndef __ASM_ARM32_SYSTEM_H
>  #define __ASM_ARM32_SYSTEM_H
>  
> -#define sev() __asm__ __volatile__ ("sev" : : : "memory")
> -#define wfe() __asm__ __volatile__ ("wfe" : : : "memory")
> -#define wfi() __asm__ __volatile__ ("wfi" : : : "memory")
> -
> -#define isb() __asm__ __volatile__ ("isb" : : : "memory")
> -#define dsb() __asm__ __volatile__ ("dsb sy" : : : "memory")
> -#define dmb() __asm__ __volatile__ ("dmb sy" : : : "memory")
> -
> -#define mb()            dsb()
> -#define rmb()           dsb()
> -#define wmb()           mb()
> -
> -#define smp_mb()        mb()
> -#define smp_rmb()       rmb()
> -#define smp_wmb()       wmb()
> -
>  extern void __bad_xchg(volatile void *, int);
>  
>  static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int 
> size)
> diff --git a/xen/include/asm-arm/arm64/system.h 
> b/xen/include/asm-arm/arm64/system.h
> index 4e41913..46f901c 100644
> --- a/xen/include/asm-arm/arm64/system.h
> +++ b/xen/include/asm-arm/arm64/system.h
> @@ -2,23 +2,6 @@
>  #ifndef __ASM_ARM64_SYSTEM_H
>  #define __ASM_ARM64_SYSTEM_H
>  
> -#define sev()           asm volatile("sev" : : : "memory")
> -#define wfe()           asm volatile("wfe" : : : "memory")
> -#define wfi()           asm volatile("wfi" : : : "memory")
> -
> -#define isb()           asm volatile("isb" : : : "memory")
> -#define dsb()           asm volatile("dsb sy" : : : "memory")
> -#define dmb()           asm volatile("dmb sy" : : : "memory")
> -
> -#define mb()            dsb()
> -#define rmb()           dsb()
> -#define wmb()           mb()
> -
> -#define smp_mb()        mb()
> -#define smp_rmb()       rmb()
> -#define smp_wmb()       wmb()
> -
> -
>  extern void __bad_xchg(volatile void *, int);
>  
>  static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int 
> size)
> diff --git a/xen/include/asm-arm/system.h b/xen/include/asm-arm/system.h
> index 290d38d..e003624 100644
> --- a/xen/include/asm-arm/system.h
> +++ b/xen/include/asm-arm/system.h
> @@ -8,6 +8,22 @@
>  #define nop() \
>      asm volatile ( "nop" )
>  
> +#define sev()           asm volatile("sev" : : : "memory")
> +#define wfe()           asm volatile("wfe" : : : "memory")
> +#define wfi()           asm volatile("wfi" : : : "memory")
> +
> +#define isb()           asm volatile("isb" : : : "memory")
> +#define dsb()           asm volatile("dsb sy" : : : "memory")
> +#define dmb()           asm volatile("dmb sy" : : : "memory")
> +
> +#define mb()            dsb()
> +#define rmb()           dsb()
> +#define wmb()           mb()
> +
> +#define smp_mb()        mb()
> +#define smp_rmb()       rmb()
> +#define smp_wmb()       wmb()
> +
>  #define xchg(ptr,x) \
>          ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
>  
> -- 
> 1.7.2.5
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.