Commit e3d18cee authored by Mark Rutland's avatar Mark Rutland Committed by Peter Zijlstra

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: default avatarMark Rutland <mark.rutland@arm.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210713105253.7615-4-mark.rutland@arm.com
parent f3e615b4
...@@ -77,9 +77,8 @@ ...@@ -77,9 +77,8 @@
__ret; \ __ret; \
}) })
#include <linux/atomic-arch-fallback.h> #include <linux/atomic/atomic-arch-fallback.h>
#include <asm-generic/atomic-instrumented.h> #include <linux/atomic/atomic-instrumented.h>
#include <linux/atomic/atomic-long.h>
#include <asm-generic/atomic-long.h>
#endif /* _LINUX_ATOMIC_H */ #endif /* _LINUX_ATOMIC_H */
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
* arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid * arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid
* double instrumentation. * double instrumentation.
*/ */
#ifndef _ASM_GENERIC_ATOMIC_INSTRUMENTED_H #ifndef _LINUX_ATOMIC_INSTRUMENTED_H
#define _ASM_GENERIC_ATOMIC_INSTRUMENTED_H #define _LINUX_ATOMIC_INSTRUMENTED_H
#include <linux/build_bug.h> #include <linux/build_bug.h>
#include <linux/compiler.h> #include <linux/compiler.h>
...@@ -1333,5 +1333,5 @@ atomic64_dec_if_positive(atomic64_t *v) ...@@ -1333,5 +1333,5 @@ atomic64_dec_if_positive(atomic64_t *v)
arch_cmpxchg_double_local(__ai_ptr, __VA_ARGS__); \ arch_cmpxchg_double_local(__ai_ptr, __VA_ARGS__); \
}) })
#endif /* _ASM_GENERIC_ATOMIC_INSTRUMENTED_H */ #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */
// 1d7c3a25aca5c7fb031c307be4c3d24c7b48fcd5 // 5edd72f105b6f54b7e9492d794abee88e6912d29
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
// Generated by scripts/atomic/gen-atomic-long.sh // Generated by scripts/atomic/gen-atomic-long.sh
// DO NOT MODIFY THIS FILE DIRECTLY // DO NOT MODIFY THIS FILE DIRECTLY
#ifndef _ASM_GENERIC_ATOMIC_LONG_H #ifndef _LINUX_ATOMIC_LONG_H
#define _ASM_GENERIC_ATOMIC_LONG_H #define _LINUX_ATOMIC_LONG_H
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/types.h> #include <asm/types.h>
...@@ -1010,5 +1010,5 @@ atomic_long_dec_if_positive(atomic_long_t *v) ...@@ -1010,5 +1010,5 @@ atomic_long_dec_if_positive(atomic_long_t *v)
} }
#endif /* CONFIG_64BIT */ #endif /* CONFIG_64BIT */
#endif /* _ASM_GENERIC_ATOMIC_LONG_H */ #endif /* _LINUX_ATOMIC_LONG_H */
// a624200981f552b2c6be4f32fe44da8289f30d87 // c5552b5d78a0c7584dfd03cba985e78a1a86bbed
...@@ -14,9 +14,9 @@ if [ $? -ne 0 ]; then ...@@ -14,9 +14,9 @@ if [ $? -ne 0 ]; then
fi fi
cat <<EOF | cat <<EOF |
asm-generic/atomic-instrumented.h linux/atomic/atomic-instrumented.h
asm-generic/atomic-long.h linux/atomic/atomic-long.h
linux/atomic-arch-fallback.h linux/atomic/atomic-arch-fallback.h
EOF EOF
while read header; do while read header; do
OLDSUM="$(tail -n 1 ${LINUXDIR}/include/${header})" OLDSUM="$(tail -n 1 ${LINUXDIR}/include/${header})"
......
...@@ -121,8 +121,8 @@ cat << EOF ...@@ -121,8 +121,8 @@ cat << EOF
* arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid * arch_ variants (i.e. arch_atomic_read()/arch_atomic_cmpxchg()) to avoid
* double instrumentation. * double instrumentation.
*/ */
#ifndef _ASM_GENERIC_ATOMIC_INSTRUMENTED_H #ifndef _LINUX_ATOMIC_INSTRUMENTED_H
#define _ASM_GENERIC_ATOMIC_INSTRUMENTED_H #define _LINUX_ATOMIC_INSTRUMENTED_H
#include <linux/build_bug.h> #include <linux/build_bug.h>
#include <linux/compiler.h> #include <linux/compiler.h>
...@@ -158,5 +158,5 @@ gen_xchg "cmpxchg_double_local" "2 * " ...@@ -158,5 +158,5 @@ gen_xchg "cmpxchg_double_local" "2 * "
cat <<EOF cat <<EOF
#endif /* _ASM_GENERIC_ATOMIC_INSTRUMENTED_H */ #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */
EOF EOF
...@@ -61,8 +61,8 @@ cat << EOF ...@@ -61,8 +61,8 @@ cat << EOF
// Generated by $0 // Generated by $0
// DO NOT MODIFY THIS FILE DIRECTLY // DO NOT MODIFY THIS FILE DIRECTLY
#ifndef _ASM_GENERIC_ATOMIC_LONG_H #ifndef _LINUX_ATOMIC_LONG_H
#define _ASM_GENERIC_ATOMIC_LONG_H #define _LINUX_ATOMIC_LONG_H
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/types.h> #include <asm/types.h>
...@@ -98,5 +98,5 @@ done ...@@ -98,5 +98,5 @@ done
cat <<EOF cat <<EOF
#endif /* CONFIG_64BIT */ #endif /* CONFIG_64BIT */
#endif /* _ASM_GENERIC_ATOMIC_LONG_H */ #endif /* _LINUX_ATOMIC_LONG_H */
EOF EOF
...@@ -8,9 +8,9 @@ ATOMICTBL=${ATOMICDIR}/atomics.tbl ...@@ -8,9 +8,9 @@ ATOMICTBL=${ATOMICDIR}/atomics.tbl
LINUXDIR=${ATOMICDIR}/../.. LINUXDIR=${ATOMICDIR}/../..
cat <<EOF | cat <<EOF |
gen-atomic-instrumented.sh asm-generic/atomic-instrumented.h gen-atomic-instrumented.sh linux/atomic/atomic-instrumented.h
gen-atomic-long.sh asm-generic/atomic-long.h gen-atomic-long.sh linux/atomic/atomic-long.h
gen-atomic-fallback.sh linux/atomic-arch-fallback.h gen-atomic-fallback.sh linux/atomic/atomic-arch-fallback.h
EOF EOF
while read script header args; do while read script header args; do
/bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header} /bin/sh ${ATOMICDIR}/${script} ${ATOMICTBL} ${args} > ${LINUXDIR}/include/${header}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment