]> Git Repo - linux.git/commit
compiler: allow all arches to enable CONFIG_OPTIMIZE_INLINING
authorMasahiro Yamada <[email protected]>
Tue, 14 May 2019 22:42:25 +0000 (15:42 -0700)
committerLinus Torvalds <[email protected]>
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/[email protected]
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Boris Brezillon <[email protected]>
Cc: Brian Norris <[email protected]>
Cc: Christophe Leroy <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Malaterre <[email protected]>
Cc: Miquel Raynal <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Ralf Baechle <[email protected]>
Cc: Richard Weinberger <[email protected]>
Cc: Russell King <[email protected]>
Cc: Stefan Agner <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
arch/x86/Kconfig
arch/x86/Kconfig.debug
include/linux/compiler_types.h
lib/Kconfig.debug
This page took 0.050532 seconds and 4 git commands to generate.