Re: smp_store_mb() oddity..

From: Heiko Carstens
Date: Thu Jul 02 2015 - 01:40:31 EST


On Wed, Jul 01, 2015 at 07:17:55PM +0200, Peter Zijlstra wrote:
> ---
> Subject: locking/arch: Make smp_store_mb() use smp_mb()
>
> Linus noticed that there were a few smp_store_mb() implementations that
> used mb(), which is inconsistent with the new naming.
>
> Since all smp_store_mb() users really are about SMP ordering, not IO
> ordering, change them all to be consistent.
>
> Cc: Tony Luck <tony.luck@xxxxxxxxx>
> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
> Suggested-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> ---
> diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h
> index e6f8615a11eb..a4dea6050c77 100644
> --- a/arch/s390/include/asm/barrier.h
> +++ b/arch/s390/include/asm/barrier.h
> @@ -36,7 +36,7 @@
> #define smp_mb__before_atomic() smp_mb()
> #define smp_mb__after_atomic() smp_mb()
>
> -#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); mb(); } while (0)
> +#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); smp_mb(); } while (0)
>
> #define smp_store_release(p, v) \

for the s390 part:
Acked-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/