Re: [kvm-unit-tests PATCH v10 12/12] ppc64: Introduce lib/ppc64/asm/barrier.h

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

 



On Fri, Jun 10, 2016 at 10:17:19AM +0200, Alexander Gordeev wrote:
> Cc: Andrew Jones <drjones@xxxxxxxxxx>
> Cc: Thomas Huth <thuth@xxxxxxxxxx>
> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> Cc: Radim Krčmář <rkrcmar@xxxxxxxxxx>
> 
> Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxx>
> ---
>  lib/asm-generic/barrier.h | 21 +++++++++++++++++++++
>  lib/asm-generic/io.h      | 11 +----------
>  lib/ppc64/asm/barrier.h   |  4 ++++
>  3 files changed, 26 insertions(+), 10 deletions(-)
>  create mode 100644 lib/asm-generic/barrier.h
>  create mode 100644 lib/ppc64/asm/barrier.h

Reviewed-by: Andrew Jones <drjones@xxxxxxxxxx>

> 
> diff --git a/lib/asm-generic/barrier.h b/lib/asm-generic/barrier.h
> new file mode 100644
> index 000000000000..21c88e9184c5
> --- /dev/null
> +++ b/lib/asm-generic/barrier.h
> @@ -0,0 +1,21 @@
> +#ifndef _ASM_BARRIER_H_
> +#define _ASM_BARRIER_H_
> +/*
> + * asm-generic/barrier.h
> + *
> + * Copyright (C) 2016, Red Hat Inc, Alexander Gordeev <agordeev@xxxxxxxxxx>
> + *
> + * This work is licensed under the terms of the GNU LGPL, version 2.
> + */
> +
> +#ifndef mb
> +#define mb()	asm volatile("":::"memory")
> +#endif
> +#ifndef rmb
> +#define rmb()	asm volatile("":::"memory")
> +#endif
> +#ifndef wmb
> +#define wmb()	asm volatile("":::"memory")
> +#endif
> +
> +#endif /* _ASM_BARRIER_H_ */
> diff --git a/lib/asm-generic/io.h b/lib/asm-generic/io.h
> index 41756dbf01bb..24725c3cd786 100644
> --- a/lib/asm-generic/io.h
> +++ b/lib/asm-generic/io.h
> @@ -11,6 +11,7 @@
>   */
>  #include "libcflat.h"
>  #include "asm/page.h"
> +#include "asm/barrier.h"
>  
>  #ifndef __raw_readb
>  static inline u8 __raw_readb(const volatile void *addr)
> @@ -127,16 +128,6 @@ static inline u64 __bswap64(u64 x)
>  	({ u64 __r = !__cpu_is_be() ? __bswap64(x) : ((u64)x); __r; })
>  #define cpu_to_be64 be64_to_cpu
>  
> -#ifndef mb
> -#define mb()	asm volatile("":::"memory")
> -#endif
> -#ifndef rmb
> -#define rmb()	asm volatile("":::"memory")
> -#endif
> -#ifndef wmb
> -#define wmb()	asm volatile("":::"memory")
> -#endif
> -
>  #define readb(addr) \
>  	({ u8 __r = __raw_readb(addr); rmb(); __r; })
>  #define readw(addr) \
> diff --git a/lib/ppc64/asm/barrier.h b/lib/ppc64/asm/barrier.h
> new file mode 100644
> index 000000000000..5c772ded52e2
> --- /dev/null
> +++ b/lib/ppc64/asm/barrier.h
> @@ -0,0 +1,4 @@
> +#ifndef _ASMPPC64_BARRIER_H_
> +#define _ASMPPC64_BARRIER_H_
> +#include <asm-generic/barrier.h>
> +#endif
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux