[PATCH v5 00/18] Rework READ_ONCE() to improve codegen
From: Will Deacon
Date: Mon May 11 2020 - 16:42:38 EST
Hi folks,
(trimmed CC list since v4 since this is largely just a rebase)
This is version five of the READ_ONCE() codegen improvement series that
I've previously posted here:
RFC: https://lore.kernel.org/lkml/20200110165636.28035-1-will@xxxxxxxxxx
v2: https://lore.kernel.org/lkml/20200123153341.19947-1-will@xxxxxxxxxx
v3: https://lore.kernel.org/lkml/20200415165218.20251-1-will@xxxxxxxxxx
v4: https://lore.kernel.org/lkml/20200421151537.19241-1-will@xxxxxxxxxx
The main change since v4 is that this is now based on top of the KCSAN
changes queued in -tip (locking/kcsan) and therefore contains the patches
necessary to avoid breaking sparc32 as well as some cleanups to
consolidate {READ,WRITE}_ONCE() and data_race().
Other changes include:
* Treat 'char' as distinct from 'signed char' and 'unsigned char' for
__builtin_types_compatible_p()
* Add a compile-time assertion that the argument to READ_ONCE_NOCHECK()
points at something the same size as 'unsigned long'
I'm happy for all of this to go via -tip, or I can take it via arm64.
Please let me know.
Cheers,
Will
Cc: Marco Elver <elver@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Paul E. McKenney <paulmck@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
--->8
Will Deacon (18):
sparc32: mm: Fix argument checking in __srmmu_get_nocache()
sparc32: mm: Restructure sparc32 MMU page-table layout
sparc32: mm: Change pgtable_t type to pte_t * instead of struct page *
sparc32: mm: Reduce allocation size for PMD and PTE tables
compiler/gcc: Raise minimum GCC version for kernel builds to 4.8
netfilter: Avoid assigning 'const' pointer to non-const pointer
net: tls: Avoid assigning 'const' pointer to non-const pointer
fault_inject: Don't rely on "return value" from WRITE_ONCE()
arm64: csum: Disable KASAN for do_csum()
READ_ONCE: Simplify implementations of {READ,WRITE}_ONCE()
READ_ONCE: Enforce atomicity for {READ,WRITE}_ONCE() memory accesses
READ_ONCE: Drop pointer qualifiers when reading from scalar types
locking/barriers: Use '__unqual_scalar_typeof' for load-acquire macros
arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release
macros
gcov: Remove old GCC 3.4 support
kcsan: Rework data_race() so that it can be used by READ_ONCE()
READ_ONCE: Use data_race() to avoid KCSAN instrumentation
linux/compiler.h: Remove redundant '#else'
Documentation/process/changes.rst | 2 +-
arch/arm/crypto/Kconfig | 12 +-
arch/arm64/include/asm/barrier.h | 16 +-
arch/arm64/lib/csum.c | 20 +-
arch/sparc/include/asm/page_32.h | 12 +-
arch/sparc/include/asm/pgalloc_32.h | 11 +-
arch/sparc/include/asm/pgtable_32.h | 40 +-
arch/sparc/include/asm/pgtsrmmu.h | 36 +-
arch/sparc/include/asm/viking.h | 5 +-
arch/sparc/kernel/head_32.S | 8 +-
arch/sparc/mm/hypersparc.S | 3 +-
arch/sparc/mm/srmmu.c | 95 ++---
arch/sparc/mm/viking.S | 5 +-
crypto/Kconfig | 1 -
drivers/xen/time.c | 2 +-
include/asm-generic/barrier.h | 16 +-
include/linux/compiler-gcc.h | 5 +-
include/linux/compiler.h | 207 +++++-----
include/linux/compiler_types.h | 26 ++
init/Kconfig | 1 -
kernel/gcov/Kconfig | 24 --
kernel/gcov/Makefile | 3 +-
kernel/gcov/gcc_3_4.c | 573 ----------------------------
lib/fault-inject.c | 4 +-
net/netfilter/core.c | 2 +-
net/tls/tls_main.c | 2 +-
scripts/gcc-plugins/Kconfig | 2 +-
27 files changed, 257 insertions(+), 876 deletions(-)
delete mode 100644 kernel/gcov/gcc_3_4.c
--
2.26.2.645.ge9eca65c58-goog