]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - init/Kconfig
Merge remote-tracking branch 'md/for-next'
[karo-tx-linux.git] / init / Kconfig
index 02da9f1fd9df16ee1e6c6bdcf5cbc8c2e05c52d5..f1af42de48f48794fa95768c0bbc53481df1153d 100644 (file)
@@ -1316,6 +1316,77 @@ config CC_OPTIMIZE_FOR_SIZE
 
          If unsure, say N.
 
+config LTO_MENU
+       bool "Enable gcc link time optimization (LTO)"
+       # Only tested on X86 for now. For other architectures you likely
+       # have to fix some things first, like adding asmlinkages etc.
+       depends on X86
+       # lto does not support excluding flags for specific files
+       # right now. Can be removed if that is fixed.
+       depends on !FUNCTION_TRACER
+       help
+         With this option gcc will do whole program optimizations for
+         the whole kernel and module. This increases compile time, but can
+         lead to better code. It allows gcc to inline functions between
+         different files and do other optimization.  It might also trigger
+         bugs due to more aggressive optimization. It allows gcc to drop unused
+         code. On smaller monolithic kernel configurations
+         it usually leads to smaller kernels, especially when modules
+         are disabled.
+
+         With this option gcc will also do some global checking over
+         different source files. It also disables a number of kernel
+         features.
+
+         This option is recommended for release builds. With LTO
+         the kernel always has to be re-optimized (but not re-parsed)
+         on each build.
+
+         This requires a gcc 4.8 or later compiler and
+         Linux binutils 2.21.51.0.3 or later.  gcc 4.9 builds significantly
+         faster than 4.8 It does not currently work with a FSF release of
+         binutils or with the gold linker.
+
+         On larger configurations this may need more than 4GB of RAM.
+         It will likely not work on those with a 32bit compiler.
+
+         When the toolchain support is not available this will (hopefully)
+         be automatically disabled.
+
+         For more information see Documentation/lto-build
+
+config LTO_DISABLE
+         bool "Disable LTO again"
+         depends on LTO_MENU
+         default n
+         help
+           This option is merely here so that allyesconfig or allmodconfig do
+           not enable LTO. If you want to actually use LTO do not enable.
+
+config LTO
+       bool
+       default y
+       depends on LTO_MENU && !LTO_DISABLE
+
+config LTO_DEBUG
+       bool "Enable LTO compile time debugging"
+       depends on LTO
+       help
+         Enable LTO debugging in the compiler. The compiler dumps
+         some log files that make it easier to figure out LTO
+         behavior. The log files also allow to reconstruct
+         the global inlining and a global callgraph.
+         They however add some (single threaded) cost to the
+         compilation.  When in doubt do not enable.
+
+config LTO_CP_CLONE
+       bool "Allow aggressive cloning for function specialization"
+       depends on LTO
+       help
+         Allow the compiler to clone and specialize functions for specific
+         arguments when it determines these arguments are very commonly
+         called.  Experimential. Will increase text size.
+
 config SYSCTL
        bool
 
@@ -1602,6 +1673,18 @@ config PCI_QUIRKS
          bugs/quirks. Disable this only if your target machine is
          unaffected by PCI quirks.
 
+config MEMBARRIER
+       bool "Enable membarrier() system call" if EXPERT
+       default y
+       help
+         Enable the membarrier() system call that allows issuing memory
+         barriers across all running threads, which can be used to distribute
+         the cost of user-space memory barriers asymmetrically by transforming
+         pairs of memory barriers into pairs consisting of membarrier() and a
+         compiler barrier.
+
+         If unsure, say Y.
+
 config EMBEDDED
        bool "Embedded system"
        option allnoconfig_y
@@ -1869,6 +1952,8 @@ config MODULE_FORCE_UNLOAD
 
 config MODVERSIONS
        bool "Module versioning support"
+       # LTO should work with gcc 4.9
+       depends on !LTO
        help
          Usually, you have to use modules compiled with your kernel.
          Saying Y here makes it sometimes possible to use modules