2019-05-20 19:08:01 +02:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2018-03-08 09:48:46 +00:00
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-13 22:51:59 -08:00
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2019-10-15 16:29:32 -07:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
locking/barriers, kcsan: Support generic instrumentation
Thus far only smp_*() barriers had been defined by asm-generic/barrier.h
based on __smp_*() barriers, because the !SMP case is usually generic.
With the introduction of instrumentation, it also makes sense to have
asm-generic/barrier.h assist in the definition of instrumented versions
of mb(), rmb(), wmb(), dma_rmb(), and dma_wmb().
Because there is no requirement to distinguish the !SMP case, the
definition can be simpler: we can avoid also providing fallbacks for the
__ prefixed cases, and only check if `defined(__<barrier>)`, to finally
define the KCSAN-instrumented versions.
This also allows for the compiler to complain if an architecture
accidentally defines both the normal and __ prefixed variant.
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-11-30 12:44:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-23 19:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
locking/barriers, kcsan: Support generic instrumentation
Thus far only smp_*() barriers had been defined by asm-generic/barrier.h
based on __smp_*() barriers, because the !SMP case is usually generic.
With the introduction of instrumentation, it also makes sense to have
asm-generic/barrier.h assist in the definition of instrumented versions
of mb(), rmb(), wmb(), dma_rmb(), and dma_wmb().
Because there is no requirement to distinguish the !SMP case, the
definition can be simpler: we can avoid also providing fallbacks for the
__ prefixed cases, and only check if `defined(__<barrier>)`, to finally
define the KCSAN-instrumented versions.
This also allows for the compiler to complain if an architecture
accidentally defines both the normal and __ prefixed variant.
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-11-30 12:44:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
|
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-23 19:31:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-11 15:02:06 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
2015-07-01 09:24:26 -07:00
|
|
|
|
|
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
|
|
|
|
|
2015-07-01 09:24:26 -07:00
|
|
|
|
2015-03-11 21:42:02 +05:30
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
|
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-05-12 10:51:55 +02:00
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
arch: Prepare for smp_mb__{before,after}_atomic()
Since the smp_mb__{before,after}*() ops are fundamentally dependent on
how an arch can implement atomics it doesn't make sense to have 3
variants of them. They must all be the same.
Furthermore, the 3 variants suggest they're only valid for those 3
atomic ops, while we have many more where they could be applied.
So move away from
smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() and reduce the
interface to just the two: smp_mb__{before,after}_atomic().
This patch prepares the way by introducing default implementations in
asm-generic/barrier.h that default to a full barrier and providing
__deprecated inlines for the previous 6 barriers if they're not
provided by the arch.
This should allow for a mostly painless transition (lots of deprecated
warns in the interim).
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-wr59327qdyi9mbzn6x937s4e@git.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: John Sullivan <jsrhbz@kanargh.force9.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-02-06 18:16:07 +01:00
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
arch: Prepare for smp_mb__{before,after}_atomic()
Since the smp_mb__{before,after}*() ops are fundamentally dependent on
how an arch can implement atomics it doesn't make sense to have 3
variants of them. They must all be the same.
Furthermore, the 3 variants suggest they're only valid for those 3
atomic ops, while we have many more where they could be applied.
So move away from
smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() and reduce the
interface to just the two: smp_mb__{before,after}_atomic().
This patch prepares the way by introducing default implementations in
asm-generic/barrier.h that default to a full barrier and providing
__deprecated inlines for the previous 6 barriers if they're not
provided by the arch.
This should allow for a mostly painless transition (lots of deprecated
warns in the interim).
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-wr59327qdyi9mbzn6x937s4e@git.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: John Sullivan <jsrhbz@kanargh.force9.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-02-06 18:16:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arch: Prepare for smp_mb__{before,after}_atomic()
Since the smp_mb__{before,after}*() ops are fundamentally dependent on
how an arch can implement atomics it doesn't make sense to have 3
variants of them. They must all be the same.
Furthermore, the 3 variants suggest they're only valid for those 3
atomic ops, while we have many more where they could be applied.
So move away from
smp_mb__{before,after}_{atomic,clear}_{dec,inc,bit}() and reduce the
interface to just the two: smp_mb__{before,after}_atomic().
This patch prepares the way by introducing default implementations in
asm-generic/barrier.h that default to a full barrier and providing
__deprecated inlines for the previous 6 barriers if they're not
provided by the arch.
This should allow for a mostly painless transition (lots of deprecated
warns in the interim).
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/n/tip-wr59327qdyi9mbzn6x937s4e@git.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: John Sullivan <jsrhbz@kanargh.force9.co.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-02-06 18:16:07 +01:00
|
|
|
|
|
|
|
|
|
2015-12-27 14:10:52 +02:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
|
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
locking, arch: use WRITE_ONCE()/READ_ONCE() in smp_store_release()/smp_load_acquire()
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 following commits:
230fa253df63 ("kernel: Provide READ_ONCE and ASSIGN_ONCE")
43239cbe79fc ("kernel: Change ASSIGN_ONCE(val, x) to WRITE_ONCE(x, val)")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Alexander Duyck <alexander.h.duyck@redhat.com>
Cc: Andre Przywara <andre.przywara@arm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linux-arch@vger.kernel.org
Link: http://lkml.kernel.org/r/1438528264-714-1-git-send-email-andreyknvl@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2015-08-02 17:11:04 +02:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2015-12-27 14:10:52 +02:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2015-12-27 14:10:52 +02:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
|
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2015-12-27 14:10:52 +02:00
|
|
|
|
2013-11-06 14:57:36 +01:00
|
|
|
|
2016-05-26 10:35:03 +02:00
|
|
|
|
2015-12-27 13:50:07 +02:00
|
|
|
|
2015-12-27 18:23:01 +02:00
|
|
|
|
2021-11-30 12:44:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-27 18:23:01 +02:00
|
|
|
|
|
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
2026-04-30 16:39:27 -07:00
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
|
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2016-06-01 19:23:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-30 16:39:27 -07:00
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
|
|
|
|
|
2019-12-19 16:22:56 +00:00
|
|
|
|
2018-04-26 11:34:15 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-01 12:52:32 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-21 11:55:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-14 18:58:57 +08:00
|
|
|
|
2021-12-21 11:55:56 +08:00
|
|
|
|
|
|
|
|
|
2024-04-15 11:21:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-28 18:30:03 +01:00
|
|
|
|
|
|
|
|
|