Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

locking/atomic: centralize generated headers

The generated atomic headers are only intended to be included directly
by <linux/atomic.h>, but are spread across include/linux/ and
include/asm-generic/, where people mnay be encouraged to include them.

This patch centralizes them under include/linux/atomic/.

Other than the header guards and hashes, there is no change to any of
the generated headers as a result of this patch.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210713105253.7615-4-mark.rutland@arm.com

authored by

Mark Rutland and committed by
Peter Zijlstra
e3d18cee f3e615b4

+23 -24
+4 -4
include/asm-generic/atomic-instrumented.h include/linux/atomic/atomic-instrumented.h
··· 14 14 * arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid 15 15 * double instrumentation. 16 16 */ 17 - #ifndef _ASM_GENERIC_ATOMIC_INSTRUMENTED_H 18 - #define _ASM_GENERIC_ATOMIC_INSTRUMENTED_H 17 + #ifndef _LINUX_ATOMIC_INSTRUMENTED_H 18 + #define _LINUX_ATOMIC_INSTRUMENTED_H 19 19 20 20 #include <linux/build_bug.h> 21 21 #include <linux/compiler.h> ··· 1333 1333 arch_cmpxchg_double_local(__ai_ptr, __VA_ARGS__); \ 1334 1334 }) 1335 1335 1336 - #endif /* _ASM_GENERIC_ATOMIC_INSTRUMENTED_H */ 1337 - // 1d7c3a25aca5c7fb031c307be4c3d24c7b48fcd5 1336 + #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */ 1337 + // 5edd72f105b6f54b7e9492d794abee88e6912d29
+4 -4
include/asm-generic/atomic-long.h include/linux/atomic/atomic-long.h
··· 3 3 // Generated by scripts/atomic/gen-atomic-long.sh 4 4 // DO NOT MODIFY THIS FILE DIRECTLY 5 5 6 - #ifndef _ASM_GENERIC_ATOMIC_LONG_H 7 - #define _ASM_GENERIC_ATOMIC_LONG_H 6 + #ifndef _LINUX_ATOMIC_LONG_H 7 + #define _LINUX_ATOMIC_LONG_H 8 8 9 9 #include <linux/compiler.h> 10 10 #include <asm/types.h> ··· 1010 1010 } 1011 1011 1012 1012 #endif /* CONFIG_64BIT */ 1013 - #endif /* _ASM_GENERIC_ATOMIC_LONG_H */ 1014 - // a624200981f552b2c6be4f32fe44da8289f30d87 1013 + #endif /* _LINUX_ATOMIC_LONG_H */ 1014 + // c5552b5d78a0c7584dfd03cba985e78a1a86bbed
include/linux/atomic-arch-fallback.h include/linux/atomic/atomic-arch-fallback.h
+3 -4
include/linux/atomic.h
··· 77 77 __ret; \ 78 78 }) 79 79 80 - #include <linux/atomic-arch-fallback.h> 81 - #include <asm-generic/atomic-instrumented.h> 82 - 83 - #include <asm-generic/atomic-long.h> 80 + #include <linux/atomic/atomic-arch-fallback.h> 81 + #include <linux/atomic/atomic-instrumented.h> 82 + #include <linux/atomic/atomic-long.h> 84 83 85 84 #endif /* _LINUX_ATOMIC_H */
+3 -3
scripts/atomic/check-atomics.sh
··· 14 14 fi 15 15 16 16 cat <<EOF | 17 - asm-generic/atomic-instrumented.h 18 - asm-generic/atomic-long.h 19 - linux/atomic-arch-fallback.h 17 + linux/atomic/atomic-instrumented.h 18 + linux/atomic/atomic-long.h 19 + linux/atomic/atomic-arch-fallback.h 20 20 EOF 21 21 while read header; do 22 22 OLDSUM="$(tail -n 1 ${LINUXDIR}/include/${header})"
+3 -3
scripts/atomic/gen-atomic-instrumented.sh
··· 121 121 * arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid 122 122 * double instrumentation. 123 123 */ 124 - #ifndef _ASM_GENERIC_ATOMIC_INSTRUMENTED_H 125 - #define _ASM_GENERIC_ATOMIC_INSTRUMENTED_H 124 + #ifndef _LINUX_ATOMIC_INSTRUMENTED_H 125 + #define _LINUX_ATOMIC_INSTRUMENTED_H 126 126 127 127 #include <linux/build_bug.h> 128 128 #include <linux/compiler.h> ··· 158 158 159 159 cat <<EOF 160 160 161 - #endif /* _ASM_GENERIC_ATOMIC_INSTRUMENTED_H */ 161 + #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */ 162 162 EOF
+3 -3
scripts/atomic/gen-atomic-long.sh
··· 61 61 // Generated by $0 62 62 // DO NOT MODIFY THIS FILE DIRECTLY 63 63 64 - #ifndef _ASM_GENERIC_ATOMIC_LONG_H 65 - #define _ASM_GENERIC_ATOMIC_LONG_H 64 + #ifndef _LINUX_ATOMIC_LONG_H 65 + #define _LINUX_ATOMIC_LONG_H 66 66 67 67 #include <linux/compiler.h> 68 68 #include <asm/types.h> ··· 98 98 99 99 cat <<EOF 100 100 #endif /* CONFIG_64BIT */ 101 - #endif /* _ASM_GENERIC_ATOMIC_LONG_H */ 101 + #endif /* _LINUX_ATOMIC_LONG_H */ 102 102 EOF
+3 -3
scripts/atomic/gen-atomics.sh
··· 8 8 LINUXDIR=${ATOMICDIR}/../.. 9 9 10 10 cat <<EOF | 11 - gen-atomic-instrumented.sh asm-generic/atomic-instrumented.h 12 - gen-atomic-long.sh asm-generic/atomic-long.h 13 - gen-atomic-fallback.sh linux/atomic-arch-fallback.h 11 + gen-atomic-instrumented.sh linux/atomic/atomic-instrumented.h 12 + gen-atomic-long.sh linux/atomic/atomic-long.h 13 + gen-atomic-fallback.sh linux/atomic/atomic-arch-fallback.h 14 14 EOF 15 15 while read script header args; do 16 16 /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header}