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 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eddie.linux-mips.org ([148.251.95.138]:38544 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbbHCGC4 (ORCPT ); Mon, 3 Aug 2015 02:02:56 -0400 Received: from localhost.localdomain ([127.0.0.1]:32809 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S27010067AbbHCGCxZAhkQ (ORCPT + 5 others); Mon, 3 Aug 2015 08:02:53 +0200 Content-Disposition: inline In-Reply-To: <1438528264-714-1-git-send-email-andreyknvl@google.com> Sender: linux-arch-owner@vger.kernel.org List-ID: 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eddie.linux-mips.org ([148.251.95.138]:38544 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbbHCGC4 (ORCPT ); Mon, 3 Aug 2015 02:02:56 -0400 Received: from localhost.localdomain ([127.0.0.1]:32809 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S27010067AbbHCGCxZAhkQ (ORCPT + 5 others); Mon, 3 Aug 2015 08:02:53 +0200 Date: Mon, 3 Aug 2015 08:02:17 +0200 From: Ralf Baechle Subject: Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire Message-ID: <20150803060217.GB16650@linux-mips.org> References: <1438528264-714-1-git-send-email-andreyknvl@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438528264-714-1-git-send-email-andreyknvl@google.com> Sender: linux-arch-owner@vger.kernel.org List-ID: 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@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Dmitry Vyukov , Christian Borntraeger , Davidlohr Bueso Message-ID: <20150803060217.JKv9E4-4Pv1xbaeXtcwpl4gD2iMEC4baqx9MFgXhjSc@z> 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Date: Mon, 03 Aug 2015 06:02:17 +0000 Subject: Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire Message-Id: <20150803060217.GB16650@linux-mips.org> List-Id: References: <1438528264-714-1-git-send-email-andreyknvl@google.com> In-Reply-To: <1438528264-714-1-git-send-email-andreyknvl@google.com> MIME-Version: 1.0 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@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-metag@vger.kernel.org, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org, Dmitry Vyukov , Christian Borntraeger , Davidlohr Bueso 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ralf Baechle Date: Mon, 03 Aug 2015 06:02:17 +0000 Subject: Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire Message-Id: <20150803060217.GB16650@linux-mips.org> List-Id: References: <1438528264-714-1-git-send-email-andreyknvl@google.com> In-Reply-To: <1438528264-714-1-git-send-email-andreyknvl@google.com> MIME-Version: 1.0 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: ralf@linux-mips.org (Ralf Baechle) Date: Mon, 3 Aug 2015 08:02:17 +0200 Subject: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in smp_store_release/smp_load_acquire In-Reply-To: <1438528264-714-1-git-send-email-andreyknvl@google.com> References: <1438528264-714-1-git-send-email-andreyknvl@google.com> Message-ID: <20150803060217.GB16650@linux-mips.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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