[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150803060217.GB16650@linux-mips.org>
Date: Mon, 3 Aug 2015 08:02:17 +0200
From: Ralf Baechle <ralf@...ux-mips.org>
To: Andrey Konovalov <andreyknvl@...gle.com>
Cc: Russell King <linux@....linux.org.uk>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will.deacon@....com>,
Tony Luck <tony.luck@...el.com>,
Fenghua Yu <fenghua.yu@...el.com>,
James Hogan <james.hogan@...tec.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
linux390@...ibm.com, "David S. Miller" <davem@...emloft.net>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Arnd Bergmann <arnd@...db.de>,
Peter Zijlstra <peterz@...radead.org>,
Alexander Duyck <alexander.h.duyck@...hat.com>,
Andre Przywara <andre.przywara@....com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Borislav Petkov <bp@...e.de>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-ia64@...r.kernel.org, linux-metag@...r.kernel.org,
linux-mips@...ux-mips.org, linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org, sparclinux@...r.kernel.org,
linux-arch@...r.kernel.org, Dmitry Vyukov <dvyukov@...gle.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
Davidlohr Bueso <dave@...olabs.net>
Subject: Re: [PATCH v2] arch: use WRITE_ONCE/READ_ONCE in
smp_store_release/smp_load_acquire
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@...ux-mips.org>
Ralf
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists