compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING
Commit
60a3cdd06394 ("x86: add optimized inlining") introduced
CONFIG_OPTIMIZE_INLINING, but it has been available only for x86.
The idea is obviously arch-agnostic. This commit moves the config entry
from arch/x86/Kconfig.debug to lib/Kconfig.debug so that all
architectures can benefit from it.
This can make a huge difference in kernel image size especially when
CONFIG_OPTIMIZE_FOR_SIZE is enabled.
For example, I got 3.5% smaller arm64 kernel for v5.1-rc1.
dec file
18983424 arch/arm64/boot/Image.before
18321920 arch/arm64/boot/Image.after
This also slightly improves the "Kernel hacking" Kconfig menu as
e61aca5158a8 ("Merge branch 'kconfig-diet' from Dave Hansen') suggested;
this config option would be a good fit in the "compiler option" menu.
Link: http://lkml.kernel.org/r/20190423034959.13525-12-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <redacted>
Acked-by: Borislav Petkov <redacted>
Cc: Arnd Bergmann <redacted>
Cc: Benjamin Herrenschmidt <redacted>
Cc: Boris Brezillon <redacted>
Cc: Brian Norris <redacted>
Cc: Christophe Leroy <redacted>
Cc: David Woodhouse <redacted>
Cc: Heiko Carstens <redacted>
Cc: "H. Peter Anvin" <redacted>
Cc: Ingo Molnar <redacted>
Cc: Marek Vasut <redacted>
Cc: Mark Rutland <redacted>
Cc: Mathieu Malaterre <redacted>
Cc: Miquel Raynal <redacted>
Cc: Paul Mackerras <redacted>
Cc: Ralf Baechle <redacted>
Cc: Richard Weinberger <redacted>
Cc: Russell King <redacted>
Cc: Stefan Agner <redacted>
Cc: Thomas Gleixner <redacted>
Signed-off-by: Andrew Morton <redacted>
Signed-off-by: Linus Torvalds <redacted>