diff options
author | Marco Elver <elver@google.com> | 2019-11-26 17:04:05 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2020-06-11 09:03:24 +0300 |
commit | 765dcd209947e7b3666c08fb109ab8b879f7a471 (patch) | |
tree | 0dbe7fe72d9bd74804abfb90453138f8a6e997c1 /scripts/atomic/fallbacks/set_release | |
parent | b29482fde649c72441d5478a4ea2c52c56d97a5e (diff) | |
download | linux-765dcd209947e7b3666c08fb109ab8b879f7a471.tar.xz |
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>
Diffstat (limited to 'scripts/atomic/fallbacks/set_release')
-rwxr-xr-x | scripts/atomic/fallbacks/set_release | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/atomic/fallbacks/set_release b/scripts/atomic/fallbacks/set_release index 45bb5e0cfc08..e5d72c717434 100755 --- a/scripts/atomic/fallbacks/set_release +++ b/scripts/atomic/fallbacks/set_release @@ -1,5 +1,5 @@ cat <<EOF -static inline void +static __always_inline void ${atomic}_set_release(${atomic}_t *v, ${int} i) { smp_store_release(&(v)->counter, i); |