linux_dsm_epyc7002/scripts/atomic/fallbacks
Marco Elver 765dcd2099 asm-generic/atomic: Use __always_inline for fallback wrappers
Use __always_inline for atomic fallback wrappers. When building for size
(CC_OPTIMIZE_FOR_SIZE), some compilers appear to be less inclined to
inline even relatively small static inline functions that are assumed to
be inlinable such as atomic ops. This can cause problems, for example in
UACCESS regions.

While the fallback wrappers aren't pure wrappers, they are trivial
nonetheless, and the function they wrap should determine the final
inlining policy.

For x86 tinyconfig we observe:
- vmlinux baseline: 1315988
- vmlinux with patch: 1315928 (-60 bytes)

[ tglx: Cherry-picked from KCSAN ]

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marco Elver <elver@google.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2020-06-11 08:03:24 +02:00
..
acquire asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
add_negative asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
add_unless asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
andnot asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
dec asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
dec_and_test asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
dec_if_positive asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
dec_unless_positive asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
fence asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
fetch_add_unless asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
inc asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
inc_and_test asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
inc_not_zero asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
inc_unless_negative asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
read_acquire asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
release asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
set_release asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
sub_and_test asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00
try_cmpxchg asm-generic/atomic: Use __always_inline for fallback wrappers 2020-06-11 08:03:24 +02:00