From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Mon, 03 Aug 2015 08:02:45 +0200 (CEST) Received: from localhost.localdomain ([127.0.0.1]:32789 "EHLO linux-mips.org" rhost-flags-OK-OK-OK-FAIL) by eddie.linux-mips.org with ESMTP id S27011102AbbHCGCnj0E7Q (ORCPT ); Mon, 3 Aug 2015 08:02:43 +0200 Received: from scotty.linux-mips.net (localhost.localdomain [127.0.0.1]) by scotty.linux-mips.net (8.15.1/8.14.8) with ESMTP id t7362SpI031271; Mon, 3 Aug 2015 08:02:28 +0200 Received: (from ralf@localhost) by scotty.linux-mips.net (8.15.1/8.15.1/Submit) id t7362HLK031262; Mon, 3 Aug 2015 08:02:17 +0200 Date: Mon, 3 Aug 2015 08:02:17 +0200 From: Ralf Baechle 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 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> User-Agent: Mutt/1.5.23 (2014-03-12) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 48538 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: ralf@linux-mips.org Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips 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