Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1198566

Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire

From Ralf Baechle <ralf@linux-mips.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire
Date 2015-08-03 08:10 +0200
Message-ID <pTh6F-2Cf-3@gated-at.bofh.it> (permalink)
References <pT3dn-7MT-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sun, Aug 02, 2015 at 05:11:04PM +0200, Andrey Konovalov wrote:

> diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h
> index 7ecba84..752e0b8 100644
> --- a/arch/mips/include/asm/barrier.h
> +++ b/arch/mips/include/asm/barrier.h
> @@ -133,12 +133,12 @@
>  do {									\
>  	compiletime_assert_atomic_type(*p);				\
>  	smp_mb();							\
> -	ACCESS_ONCE(*p) = (v);						\
> +	WRITE_ONCE(*p, v);						\
>  } while (0)
>  
>  #define smp_load_acquire(p)						\
>  ({									\
> -	typeof(*p) ___p1 = ACCESS_ONCE(*p);				\
> +	typeof(*p) ___p1 = READ_ONCE(*p);				\
>  	compiletime_assert_atomic_type(*p);				\
>  	smp_mb();							\
>  	___p1;								\

Acked-by: Ralf Baechle <ralf@linux-mips.org>

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire Andrey Konovalov <andreyknvl@google.com> - 2015-08-02 17:20 +0200
  Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in  smp_store_release/smp_load_acquire Peter Zijlstra <peterz@infradead.org> - 2015-08-02 18:10 +0200
  Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in  smp_store_release/smp_load_acquire Michael Ellerman <mpe@ellerman.id.au> - 2015-08-03 03:50 +0200
  Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in  smp_store_release/smp_load_acquire Davidlohr Bueso <dave@stgolabs.net> - 2015-08-03 03:50 +0200
  Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in  smp_store_release/smp_load_acquire Ralf Baechle <ralf@linux-mips.org> - 2015-08-03 08:10 +0200
  [tip:locking/core] locking, arch: use WRITE_ONCE()/READ_ONCE()   in smp_store_release()/smp_load_acquire() tip-bot for Andrey Konovalov <tipbot@zytor.com> - 2015-08-03 19:10 +0200

csiph-web