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

2015-08-03 Thread Ralf Baechle
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 r...@linux-mips.org

  Ralf
--
To unsubscribe from this list: send the line unsubscribe linux-metag in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2015-08-02 Thread Peter Zijlstra
On Sun, Aug 02, 2015 at 05:11:04PM +0200, Andrey Konovalov wrote:
 Replace ACCESS_ONCE() macro in smp_store_release() and smp_load_acquire()
 with WRITE_ONCE() and READ_ONCE() on x86, arm, arm64, ia64, metag, mips,
 powerpc, s390, sparc and asm-generic since ACCESS_ONCE does not work
 reliably on non-scalar types.
 
 WRITE_ONCE() and READ_ONCE() were introduced in the commits 230fa253df63
 (kernel: Provide READ_ONCE and ASSIGN_ONCE) and 43239cbe79fc (kernel:
 Change ASSIGN_ONCE(val, x) to WRITE_ONCE(x, val)).
 
 Signed-off-by: Andrey Konovalov andreyk...@google.com

Thanks!
--
To unsubscribe from this list: send the line unsubscribe linux-metag in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html