linux/scripts/atomic
Marco Elver c020395b66 asm-generic/atomic: Use __always_inline for pure wrappers
Prefer __always_inline for atomic 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.

By using __always_inline, we let the real implementation and not the
wrapper determine the final inlining preference.

For x86 tinyconfig we observe:
- vmlinux baseline: 1316204
- vmlinux with patch: 1315988 (-216 bytes)

This came up when addressing UACCESS warnings with CC_OPTIMIZE_FOR_SIZE
in the KCSAN runtime:
http://lkml.kernel.org/r/58708908-84a0-0a81-a836-ad97e33dbb62@infradead.org

Reported-by: Randy Dunlap <rdunlap@infradead.org>
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>
2020-01-07 07:47:23 -08:00
..
fallbacks locking/atomics: Fix scripts/atomic/ script permissions 2018-11-01 12:45:46 +01:00
atomic-tbl.sh locking/atomics: Change 'fold' to 'grep' 2019-02-11 14:27:33 +01:00
atomics.tbl locking/atomics: Fix scripts/atomic/ script permissions 2018-11-01 12:45:46 +01:00
check-atomics.sh locking/atomics: Use sed(1) instead of non-standard head(1) option 2019-06-25 10:17:07 +02:00
gen-atomic-fallback.sh locking/atomics: Fix scripts/atomic/ script permissions 2018-11-01 12:45:46 +01:00
gen-atomic-instrumented.sh asm-generic/atomic: Use __always_inline for pure wrappers 2020-01-07 07:47:23 -08:00
gen-atomic-long.sh asm-generic/atomic: Use __always_inline for pure wrappers 2020-01-07 07:47:23 -08:00
gen-atomics.sh locking/atomics: Don't assume that scripts are executable 2019-04-19 14:21:43 +02:00