Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Kconfig: consolidate the "Kernel hacking" menu

Move the source of lib/Kconfig.debug and arch/$(ARCH)/Kconfig.debug to
the top-level Kconfig. For two architectures that means moving their
arch-specific symbols in that menu into a new arch Kconfig.debug file,
and for a few more creating a dummy file so that we can include it
unconditionally.

Also move the actual 'Kernel hacking' menu to lib/Kconfig.debug, where
it belongs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

authored by

Christoph Hellwig and committed by
Masahiro Yamada
06ec64b8 1572497c

+59 -206
+2
Kconfig
··· 30 30 source "crypto/Kconfig" 31 31 32 32 source "lib/Kconfig" 33 + 34 + source "lib/Kconfig.debug"
-2
arch/alpha/Kconfig
··· 710 710 711 711 endmenu 712 712 713 - source "arch/alpha/Kconfig.debug" 714 - 715 713 # DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig 716 714 # but we also need it if VGA_HOSE is set 717 715 config DUMMY_CONSOLE
-5
arch/alpha/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config EARLY_PRINTK 7 4 bool ··· 36 39 This option is required for IEEE compliant floating point arithmetic 37 40 on the Alpha. The only time you would ever not say Y is to say M in 38 41 order to debug the code. Say Y unless you know what you are doing. 39 - 40 - endmenu
-1
arch/arc/Kconfig
··· 574 574 575 575 endmenu 576 576 577 - source "arch/arc/Kconfig.debug" 578 577 source "kernel/power/Kconfig"
-5
arch/arc/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config 16KSTACKS 7 4 bool "Use 16Kb for kernel stacks instead of 8Kb" ··· 8 11 This increases the resident kernel footprint and will cause less 9 12 threads to run on the system and also increase the pressure 10 13 on the VM subsystem for higher order allocations. 11 - 12 - endmenu
-2
arch/arm/Kconfig
··· 2191 2191 2192 2192 source "drivers/firmware/Kconfig" 2193 2193 2194 - source "arch/arm/Kconfig.debug" 2195 - 2196 2194 if CRYPTO 2197 2195 source "arch/arm/crypto/Kconfig" 2198 2196 endif
-5
arch/arm/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config ARM_PTDUMP_CORE 7 4 def_bool n ··· 1860 1863 are planning to use hardware trace tools with this kernel. 1861 1864 1862 1865 source "drivers/hwtracing/coresight/Kconfig" 1863 - 1864 - endmenu
-2
arch/arm64/Kconfig
··· 1321 1321 1322 1322 source "arch/arm64/kvm/Kconfig" 1323 1323 1324 - source "arch/arm64/Kconfig.debug" 1325 - 1326 1324 if CRYPTO 1327 1325 source "arch/arm64/crypto/Kconfig" 1328 1326 endif
-5
arch/arm64/Kconfig.debug
··· 1 - menu "Kernel hacking" 2 - 3 - source "lib/Kconfig.debug" 4 1 5 2 config ARM64_PTDUMP_CORE 6 3 def_bool n ··· 94 97 tristate "Relocation testing module" 95 98 96 99 source "drivers/hwtracing/coresight/Kconfig" 97 - 98 - endmenu
-15
arch/c6x/Kconfig
··· 115 115 source "kernel/Kconfig.hz" 116 116 117 117 endmenu 118 - 119 - menu "Kernel hacking" 120 - 121 - source "lib/Kconfig.debug" 122 - 123 - config ACCESS_CHECK 124 - bool "Check the user pointer address" 125 - default y 126 - help 127 - Usually the pointer transfer from user space is checked to see if its 128 - address is in the kernel space. 129 - 130 - Say N here to disable that check to improve the performance. 131 - 132 - endmenu
+10
arch/c6x/Kconfig.debug
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + 3 + config ACCESS_CHECK 4 + bool "Check the user pointer address" 5 + default y 6 + help 7 + Usually the pointer transfer from user space is checked to see if its 8 + address is in the kernel space. 9 + 10 + Say N here to disable that check to improve the performance.
-6
arch/h8300/Kconfig
··· 55 55 source "kernel/Kconfig.preempt" 56 56 57 57 endmenu 58 - 59 - menu "Kernel hacking" 60 - 61 - source "lib/Kconfig.debug" 62 - 63 - endmenu
+1
arch/h8300/Kconfig.debug
··· 1 + # dummy file, do not delete
-4
arch/hexagon/Kconfig
··· 149 149 source "kernel/Kconfig.hz" 150 150 151 151 endmenu 152 - 153 - menu "Kernel hacking" 154 - source "lib/Kconfig.debug" 155 - endmenu
+1
arch/hexagon/Kconfig.debug
··· 1 + # dummy file, do not delete
-2
arch/ia64/Kconfig
··· 576 576 If you have an ia64 and you want to enable memory special 577 577 operations support (formerly known as fetchop), say Y here, 578 578 otherwise say N. 579 - 580 - source "arch/ia64/Kconfig.debug"
-5
arch/ia64/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 choice 7 4 prompt "Physical memory granularity" ··· 53 56 Selecting this option turns on bug checking for the IA-64 irq_save 54 57 and restore instructions. It's useful for tracking down spinlock 55 58 problems, but slow! If you're unsure, select N. 56 - 57 - endmenu
-2
arch/m68k/Kconfig
··· 147 147 endif 148 148 149 149 source "arch/m68k/Kconfig.devices" 150 - 151 - source "arch/m68k/Kconfig.debug"
-5
arch/m68k/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config BOOTPARAM 7 4 bool 'Compiled-in Kernel Boot Parameter' ··· 48 51 Disable the ColdFire CPU's BDM signals. 49 52 50 53 endif 51 - 52 - endmenu
-2
arch/microblaze/Kconfig
··· 285 285 source "drivers/pci/Kconfig" 286 286 287 287 endmenu 288 - 289 - source "arch/microblaze/Kconfig.debug"
-6
arch/microblaze/Kconfig.debug
··· 1 1 # For a description of the syntax of this configuration file, 2 2 # see Documentation/kbuild/kconfig-language.txt. 3 3 4 - menu "Kernel hacking" 5 - 6 4 config TRACE_IRQFLAGS_SUPPORT 7 5 def_bool y 8 - 9 - source "lib/Kconfig.debug" 10 - 11 - endmenu
-2
arch/mips/Kconfig
··· 3195 3195 3196 3196 source "drivers/firmware/Kconfig" 3197 3197 3198 - source "arch/mips/Kconfig.debug" 3199 - 3200 3198 source "arch/mips/kvm/Kconfig"
-5
arch/mips/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 2 4 3 config TRACE_IRQFLAGS_SUPPORT 5 4 bool 6 5 default y 7 - 8 - source "lib/Kconfig.debug" 9 6 10 7 config EARLY_PRINTK 11 8 bool "Early printk" if EXPERT ··· 152 155 adjacent ns16550 registers in the system. 153 156 154 157 endif # MIPS_CPS_NS16550_BOOL 155 - 156 - endmenu
-4
arch/nds32/Kconfig
··· 91 91 source "kernel/Kconfig.preempt" 92 92 source "kernel/Kconfig.hz" 93 93 endmenu 94 - 95 - menu "Kernel hacking" 96 - source "lib/Kconfig.debug" 97 - endmenu
+1
arch/nds32/Kconfig.debug
··· 1 + # dummy file, do not delete
-2
arch/nios2/Kconfig
··· 187 187 default "0xe0000000" 188 188 189 189 endmenu 190 - 191 - source "arch/nios2/Kconfig.debug"
-5
arch/nios2/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 2 4 3 config TRACE_IRQFLAGS_SUPPORT 5 4 def_bool y 6 - 7 - source "lib/Kconfig.debug" 8 5 9 6 config DEBUG_STACK_USAGE 10 7 bool "Enable stack utilization instrumentation" ··· 21 24 This is useful for kernel debugging when your machine crashes very 22 25 early before the console code is initialized. 23 26 You should normally say N here, unless you want to debug such a crash. 24 - 25 - endmenu
-6
arch/openrisc/Kconfig
··· 201 201 endmenu 202 202 203 203 endmenu 204 - 205 - menu "Kernel hacking" 206 - 207 - source "lib/Kconfig.debug" 208 - 209 - endmenu
+1
arch/openrisc/Kconfig.debug
··· 1 + # dummy file, do not delete
-2
arch/parisc/Kconfig
··· 349 349 350 350 source "drivers/parisc/Kconfig" 351 351 352 - source "arch/parisc/Kconfig.debug" 353 - 354 352 config SECCOMP 355 353 def_bool y 356 354 prompt "Enable seccomp to safely compute untrusted bytecode"
-5
arch/parisc/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config TRACE_IRQFLAGS_SUPPORT 7 4 def_bool y 8 - 9 - endmenu
-2
arch/powerpc/Kconfig
··· 1194 1194 config ARCH_RANDOM 1195 1195 def_bool n 1196 1196 1197 - source "arch/powerpc/Kconfig.debug" 1198 - 1199 1197 config PPC_LIB_RHEAP 1200 1198 bool 1201 1199
-5
arch/powerpc/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config PPC_DISABLE_WERROR 7 4 bool "Don't build arch/powerpc code with -Werror" ··· 376 379 depends on DEBUG_KERNEL && PPC_BOOK3S_64 377 380 help 378 381 If you're unsure what this is, say N. 379 - 380 - endmenu
-45
arch/riscv/Kconfig
··· 245 245 source kernel/power/Kconfig 246 246 247 247 endmenu 248 - 249 - menu "Kernel hacking" 250 - 251 - config CMDLINE_BOOL 252 - bool "Built-in kernel command line" 253 - help 254 - For most platforms, it is firmware or second stage bootloader 255 - that by default specifies the kernel command line options. 256 - However, it might be necessary or advantageous to either override 257 - the default kernel command line or add a few extra options to it. 258 - For such cases, this option allows hardcoding command line options 259 - directly into the kernel. 260 - 261 - For that, choose 'Y' here and fill in the extra boot parameters 262 - in CONFIG_CMDLINE. 263 - 264 - The built-in options will be concatenated to the default command 265 - line if CMDLINE_FORCE is set to 'N'. Otherwise, the default 266 - command line will be ignored and replaced by the built-in string. 267 - 268 - config CMDLINE 269 - string "Built-in kernel command string" 270 - depends on CMDLINE_BOOL 271 - default "" 272 - help 273 - Supply command-line options at build time by entering them here. 274 - 275 - config CMDLINE_FORCE 276 - bool "Built-in command line overrides bootloader arguments" 277 - depends on CMDLINE_BOOL 278 - help 279 - Set this option to 'Y' to have the kernel ignore the bootloader 280 - or firmware command line. Instead, the built-in command line 281 - will be used exclusively. 282 - 283 - If you don't know what to do here, say N. 284 - 285 - config EARLY_PRINTK 286 - def_bool y 287 - 288 - source "lib/Kconfig.debug" 289 - 290 - config CMDLINE_BOOL 291 - bool 292 - endmenu
+37
arch/riscv/Kconfig.debug
··· 1 + 2 + config CMDLINE_BOOL 3 + bool "Built-in kernel command line" 4 + help 5 + For most platforms, it is firmware or second stage bootloader 6 + that by default specifies the kernel command line options. 7 + However, it might be necessary or advantageous to either override 8 + the default kernel command line or add a few extra options to it. 9 + For such cases, this option allows hardcoding command line options 10 + directly into the kernel. 11 + 12 + For that, choose 'Y' here and fill in the extra boot parameters 13 + in CONFIG_CMDLINE. 14 + 15 + The built-in options will be concatenated to the default command 16 + line if CMDLINE_FORCE is set to 'N'. Otherwise, the default 17 + command line will be ignored and replaced by the built-in string. 18 + 19 + config CMDLINE 20 + string "Built-in kernel command string" 21 + depends on CMDLINE_BOOL 22 + default "" 23 + help 24 + Supply command-line options at build time by entering them here. 25 + 26 + config CMDLINE_FORCE 27 + bool "Built-in command line overrides bootloader arguments" 28 + depends on CMDLINE_BOOL 29 + help 30 + Set this option to 'Y' to have the kernel ignore the bootloader 31 + or firmware command line. Instead, the built-in command line 32 + will be used exclusively. 33 + 34 + If you don't know what to do here, say N. 35 + 36 + config EARLY_PRINTK 37 + def_bool y
-2
arch/s390/Kconfig
··· 828 828 tristate 829 829 default (SMC || CCWGROUP) 830 830 831 - source "arch/s390/Kconfig.debug" 832 - 833 831 menu "Virtualization" 834 832 835 833 config PFAULT
-5
arch/s390/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 2 4 3 config TRACE_IRQFLAGS_SUPPORT 5 4 def_bool y 6 - 7 - source "lib/Kconfig.debug" 8 5 9 6 config S390_PTDUMP 10 7 bool "Export kernel pagetable layout to userspace via debugfs" ··· 17 20 18 21 config EARLY_PRINTK 19 22 def_bool y 20 - 21 - endmenu
-2
arch/sh/Kconfig
··· 885 885 source "drivers/cpuidle/Kconfig" 886 886 887 887 endmenu 888 - 889 - source "arch/sh/Kconfig.debug"
-5
arch/sh/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 2 4 3 config TRACE_IRQFLAGS_SUPPORT 5 4 def_bool y 6 - 7 - source "lib/Kconfig.debug" 8 5 9 6 config SH_STANDARD_BIOS 10 7 bool "Use LinuxSH standard BIOS" ··· 85 88 def_bool y 86 89 depends on SUPERH32 87 90 depends on STACK_DEBUG || FUNCTION_TRACER 88 - 89 - endmenu
-2
arch/sparc/Kconfig
··· 565 565 default y 566 566 567 567 source "drivers/sbus/char/Kconfig" 568 - 569 - source "arch/sparc/Kconfig.debug"
-5
arch/sparc/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 2 4 3 config TRACE_IRQFLAGS_SUPPORT 5 4 bool 6 5 default y 7 - 8 - source "lib/Kconfig.debug" 9 6 10 7 config DEBUG_DCFLUSH 11 8 bool "D-cache flush debugging" ··· 18 21 bool 19 22 depends on MCOUNT 20 23 default y 21 - 22 - endmenu
-2
arch/um/Kconfig
··· 187 187 endmenu 188 188 189 189 source "arch/um/drivers/Kconfig" 190 - 191 - source "arch/um/Kconfig.debug"
-5
arch/um/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config GPROF 7 4 bool "Enable gprof support" ··· 34 37 35 38 This is useful for kernel debugging when your machine crashes very 36 39 early before the console code is initialized. 37 - 38 - endmenu
-2
arch/unicore32/Kconfig
··· 222 222 endif 223 223 224 224 endif 225 - 226 - source "arch/unicore32/Kconfig.debug"
-5
arch/unicore32/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config EARLY_PRINTK 7 4 def_bool DEBUG_OCD ··· 27 30 help 28 31 Say Y here if you want the debug print routines to direct their 29 32 output to the UniCore On-Chip-Debugger channel using CP #1. 30 - 31 - endmenu
-2
arch/x86/Kconfig
··· 2931 2931 2932 2932 source "drivers/firmware/Kconfig" 2933 2933 2934 - source "arch/x86/Kconfig.debug" 2935 - 2936 2934 source "arch/x86/kvm/Kconfig"
-5
arch/x86/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 2 4 3 config TRACE_IRQFLAGS_SUPPORT 5 4 def_bool y 6 - 7 - source "lib/Kconfig.debug" 8 5 9 6 config EARLY_PRINTK_USB 10 7 bool ··· 407 410 config FRAME_POINTER 408 411 depends on !UNWINDER_ORC && !UNWINDER_GUESS 409 412 bool 410 - 411 - endmenu
-2
arch/xtensa/Kconfig
··· 567 567 source "kernel/power/Kconfig" 568 568 569 569 endmenu 570 - 571 - source "arch/xtensa/Kconfig.debug"
-5
arch/xtensa/Kconfig.debug
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 - menu "Kernel hacking" 3 - 4 - source "lib/Kconfig.debug" 5 2 6 3 config DEBUG_TLB_SANITY 7 4 bool "Debug TLB sanity" ··· 31 34 It is easy to make wrong hardware configuration, this test should catch it early. 32 35 33 36 Say 'N' on stable hardware. 34 - 35 - endmenu
+6
lib/Kconfig.debug
··· 1 + menu "Kernel hacking" 2 + 1 3 menu "printk and dmesg options" 2 4 3 5 config PRINTK_TIME ··· 2036 2034 if the driver using a given range cannot be disabled. 2037 2035 2038 2036 If in doubt, say Y. 2037 + 2038 + source "arch/$(SRCARCH)/Kconfig.debug" 2039 + 2040 + endmenu # Kernel hacking