Files
android_kernel_motorola_sm6225/include/linux
Will Deacon 648a163657 UPSTREAM: READ_ONCE: Simplify implementations of {READ,WRITE}_ONCE()
The implementations of {READ,WRITE}_ONCE() suffer from a significant
amount of indirection and complexity due to a historic GCC bug:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145

which was originally worked around by 230fa253df ("kernel: Provide
READ_ONCE and ASSIGN_ONCE").

Since GCC 4.8 is fairly vintage at this point and we emit a warning if
we detect it during the build, return {READ,WRITE}_ONCE() to their former
glory with an implementation that is easier to understand and, crucially,
more amenable to optimisation. A side effect of this simplification is
that WRITE_ONCE() no longer returns a value, but nobody seems to be
relying on that and the new behaviour is aligned with smp_store_release().

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Change-Id: I15d15e61577164e22aa215b9405d24491bd92b93
Signed-off-by: Will Deacon <will@kernel.org>
2026-01-23 15:34:20 +00:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-08-31 10:10:00 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-09-30 21:35:03 +01:00
…
…
2012-10-08 13:50:20 +10:30
…
2018-06-15 18:10:01 -03:00
…
…
…
…
…
…
…
…
…
…
2022-12-17 00:25:35 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-06-15 18:10:01 -03:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-01-01 12:40:27 -07:00
…
…
…
…
…
…
…
2020-06-17 06:00:22 +05:30
…
…
2014-12-31 13:06:50 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-26 08:53:43 -06:00
…
…
…
…
…
…
…
…
…
…
…
2024-06-09 02:32:30 +03:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-12 09:41:19 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2019-12-31 16:35:38 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-06-30 19:17:14 +02:00
…
…
…
…
2025-09-22 10:17:51 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2020-06-16 12:51:47 -07:00
2017-11-09 10:23:28 +01:00
…
…
…
…
…
…
…
…
…
…
…
2023-02-22 12:28:07 +00:00
…
2019-08-12 13:36:37 -04:00
…
…
…
…
…
…
…
…
…
…
…
2025-09-16 13:55:10 +02:00
…
…
2025-08-28 03:26:18 +03:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2021-12-14 10:18:04 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
2020-04-02 15:28:22 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-08-16 12:14:42 -07:00
…
…
…
…
2020-01-09 15:11:34 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-02-28 18:50:08 +05:30
…
…
…
…
…
…
…
…
…
…
2017-08-15 09:02:08 -07:00
…