220-optimize_inlining.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --- a/arch/x86/Kconfig.debug
  2. +++ b/arch/x86/Kconfig.debug
  3. @@ -287,20 +287,6 @@ config CPA_DEBUG
  4. ---help---
  5. Do change_page_attr() self-tests every 30 seconds.
  6. -config OPTIMIZE_INLINING
  7. - bool "Allow gcc to uninline functions marked 'inline'"
  8. - ---help---
  9. - This option determines if the kernel forces gcc to inline the functions
  10. - developers have marked 'inline'. Doing so takes away freedom from gcc to
  11. - do what it thinks is best, which is desirable for the gcc 3.x series of
  12. - compilers. The gcc 4.x series have a rewritten inlining algorithm and
  13. - enabling this option will generate a smaller kernel there. Hopefully
  14. - this algorithm is so good that allowing gcc 4.x and above to make the
  15. - decision will become the default in the future. Until then this option
  16. - is there to test gcc for this.
  17. -
  18. - If unsure, say N.
  19. -
  20. config DEBUG_ENTRY
  21. bool "Debug low-level entry code"
  22. depends on DEBUG_KERNEL
  23. --- a/lib/Kconfig.debug
  24. +++ b/lib/Kconfig.debug
  25. @@ -117,6 +117,20 @@ endmenu # "printk and dmesg options"
  26. menu "Compile-time checks and compiler options"
  27. +config OPTIMIZE_INLINING
  28. + bool "Allow gcc to uninline functions marked 'inline'"
  29. + ---help---
  30. + This option determines if the kernel forces gcc to inline the functions
  31. + developers have marked 'inline'. Doing so takes away freedom from gcc to
  32. + do what it thinks is best, which is desirable for the gcc 3.x series of
  33. + compilers. The gcc 4.x series have a rewritten inlining algorithm and
  34. + enabling this option will generate a smaller kernel there. Hopefully
  35. + this algorithm is so good that allowing gcc 4.x and above to make the
  36. + decision will become the default in the future. Until then this option
  37. + is there to test gcc for this.
  38. +
  39. + If unsure, say N.
  40. +
  41. config DEBUG_INFO
  42. bool "Compile the kernel with debug info"
  43. depends on DEBUG_KERNEL && !COMPILE_TEST
  44. --- a/arch/x86/Kconfig
  45. +++ b/arch/x86/Kconfig
  46. @@ -273,9 +273,6 @@ config ZONE_DMA32
  47. config AUDIT_ARCH
  48. def_bool y if X86_64
  49. -config ARCH_SUPPORTS_OPTIMIZED_INLINING
  50. - def_bool y
  51. -
  52. config ARCH_SUPPORTS_DEBUG_PAGEALLOC
  53. def_bool y
  54. --- a/include/linux/compiler-gcc.h
  55. +++ b/include/linux/compiler-gcc.h
  56. @@ -89,8 +89,7 @@
  57. * of extern inline functions at link time.
  58. * A lot of inline functions can cause havoc with function tracing.
  59. */
  60. -#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
  61. - !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
  62. +#if !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
  63. #define inline \
  64. inline __attribute__((always_inline, unused)) notrace __gnu_inline
  65. #else