]> exis.tech > repos - linux.git/commit
compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING
authorMasahiro Yamada <redacted>
Tue, 14 May 2019 22:42:25 +0000 (15:42 -0700)
committerLinus Torvalds <redacted>
Wed, 15 May 2019 02:52:48 +0000 (19:52 -0700)
commit9012d011660ea5cf2a623e1de207a2bc0ca6936d
treef8262000f8891b8587b5c7442a3bec172aa8dbc4
parentefc344c57e39754416731e24e1eadd7d9b9f335e
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>
arch/x86/Kconfig
arch/x86/Kconfig.debug
include/linux/compiler_types.h
lib/Kconfig.debug