locking/spinlocks: Mark spinlocks noinline when inline spinlocks are disabled
authorAndi Kleen <ak@linux.intel.com>
Tue, 19 Jul 2022 11:05:48 +0000 (13:05 +0200)
committerIngo Molnar <mingo@kernel.org>
Thu, 4 Aug 2022 09:05:43 +0000 (11:05 +0200)
commit9aeaf5bc4e30ec968ae660b865ed491a28daf500
tree56bb70795842225040b8e8ead67071774578df2d
parentd171011e6adad135eaced630dce26cac9a174037
locking/spinlocks: Mark spinlocks noinline when inline spinlocks are disabled

Otherwise LTO will inline them anyways and cause a large kernel text increase.

Since the explicit intention here is to not inline them marking them noinline
is good documentation even for the non-LTO case.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Martin Liska <mliska@suse.cz>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20220719110548.1544-1-jslaby@suse.cz
kernel/locking/spinlock.c