From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Subject: Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire Date: Mon, 3 Aug 2015 08:02:17 +0200 Message-ID: <20150803060217.GB16650@linux-mips.org> References: <1438528264-714-1-git-send-email-andreyknvl@google.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <1438528264-714-1-git-send-email-andreyknvl@google.com> Sender: linux-arch-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrey Konovalov Cc: Russell King , Catalin Marinas , Will Deacon , Tony Luck , Fenghua Yu , James Hogan , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Arnd Bergmann , Peter Zijlstra , Alexander Duyck , Andre Przywara , "Paul E. McKenney" , Borislav Petkov , linux-arm-kernel@l 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