summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-07-31 07:39:31 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-08-01 19:06:48 -0400
commit06ec64b84c357693e9a5540de8eedfc775dbae12 (patch)
tree3145268247062ba0b41175280a65f152070e5ee7
parent1572497cb0e6d2016078bc9d5a95786bb878389f (diff)
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>
-rw-r--r--Kconfig2
-rw-r--r--arch/alpha/Kconfig2
-rw-r--r--arch/alpha/Kconfig.debug5
-rw-r--r--arch/arc/Kconfig1
-rw-r--r--arch/arc/Kconfig.debug5
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/Kconfig.debug5
-rw-r--r--arch/arm64/Kconfig2
-rw-r--r--arch/arm64/Kconfig.debug5
-rw-r--r--arch/c6x/Kconfig15
-rw-r--r--arch/c6x/Kconfig.debug10
-rw-r--r--arch/h8300/Kconfig6
-rw-r--r--arch/h8300/Kconfig.debug1
-rw-r--r--arch/hexagon/Kconfig4
-rw-r--r--arch/hexagon/Kconfig.debug1
-rw-r--r--arch/ia64/Kconfig2
-rw-r--r--arch/ia64/Kconfig.debug5
-rw-r--r--arch/m68k/Kconfig2
-rw-r--r--arch/m68k/Kconfig.debug5
-rw-r--r--arch/microblaze/Kconfig2
-rw-r--r--arch/microblaze/Kconfig.debug6
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/Kconfig.debug5
-rw-r--r--arch/nds32/Kconfig4
-rw-r--r--arch/nds32/Kconfig.debug1
-rw-r--r--arch/nios2/Kconfig2
-rw-r--r--arch/nios2/Kconfig.debug5
-rw-r--r--arch/openrisc/Kconfig6
-rw-r--r--arch/openrisc/Kconfig.debug1
-rw-r--r--arch/parisc/Kconfig2
-rw-r--r--arch/parisc/Kconfig.debug5
-rw-r--r--arch/powerpc/Kconfig2
-rw-r--r--arch/powerpc/Kconfig.debug5
-rw-r--r--arch/riscv/Kconfig45
-rw-r--r--arch/riscv/Kconfig.debug37
-rw-r--r--arch/s390/Kconfig2
-rw-r--r--arch/s390/Kconfig.debug5
-rw-r--r--arch/sh/Kconfig2
-rw-r--r--arch/sh/Kconfig.debug5
-rw-r--r--arch/sparc/Kconfig2
-rw-r--r--arch/sparc/Kconfig.debug5
-rw-r--r--arch/um/Kconfig2
-rw-r--r--arch/um/Kconfig.debug5
-rw-r--r--arch/unicore32/Kconfig2
-rw-r--r--arch/unicore32/Kconfig.debug5
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/Kconfig.debug5
-rw-r--r--arch/xtensa/Kconfig2
-rw-r--r--arch/xtensa/Kconfig.debug5
-rw-r--r--lib/Kconfig.debug6
50 files changed, 59 insertions, 206 deletions
diff --git a/Kconfig b/Kconfig
index 1a5c0a5d4ea1..a5997d6c2029 100644
--- a/Kconfig
+++ b/Kconfig
@@ -30,3 +30,5 @@ source "security/Kconfig"
30source "crypto/Kconfig" 30source "crypto/Kconfig"
31 31
32source "lib/Kconfig" 32source "lib/Kconfig"
33
34source "lib/Kconfig.debug"
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 50676152babd..e4334f017f8e 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -710,8 +710,6 @@ config SRM_ENV
710 710
711endmenu 711endmenu
712 712
713source "arch/alpha/Kconfig.debug"
714
715# DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig 713# DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig
716# but we also need it if VGA_HOSE is set 714# but we also need it if VGA_HOSE is set
717config DUMMY_CONSOLE 715config DUMMY_CONSOLE
diff --git a/arch/alpha/Kconfig.debug b/arch/alpha/Kconfig.debug
index 5e93dffb818a..b88c7b641d72 100644
--- a/arch/alpha/Kconfig.debug
+++ b/arch/alpha/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config EARLY_PRINTK 3config EARLY_PRINTK
7 bool 4 bool
@@ -39,5 +36,3 @@ config MATHEMU
39 This option is required for IEEE compliant floating point arithmetic 36 This option is required for IEEE compliant floating point arithmetic
40 on the Alpha. The only time you would ever not say Y is to say M in 37 on the Alpha. The only time you would ever not say Y is to say M in
41 order to debug the code. Say Y unless you know what you are doing. 38 order to debug the code. Say Y unless you know what you are doing.
42
43endmenu
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index d4a28c45c406..5aab069eba17 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -574,5 +574,4 @@ source "drivers/pci/Kconfig"
574 574
575endmenu 575endmenu
576 576
577source "arch/arc/Kconfig.debug"
578source "kernel/power/Kconfig" 577source "kernel/power/Kconfig"
diff --git a/arch/arc/Kconfig.debug b/arch/arc/Kconfig.debug
index 03da1a6b3072..45add86decd5 100644
--- a/arch/arc/Kconfig.debug
+++ b/arch/arc/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config 16KSTACKS 3config 16KSTACKS
7 bool "Use 16Kb for kernel stacks instead of 8Kb" 4 bool "Use 16Kb for kernel stacks instead of 8Kb"
@@ -11,5 +8,3 @@ config 16KSTACKS
11 This increases the resident kernel footprint and will cause less 8 This increases the resident kernel footprint and will cause less
12 threads to run on the system and also increase the pressure 9 threads to run on the system and also increase the pressure
13 on the VM subsystem for higher order allocations. 10 on the VM subsystem for higher order allocations.
14
15endmenu
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 46ee6669204b..9aaa23c25374 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2191,8 +2191,6 @@ endmenu
2191 2191
2192source "drivers/firmware/Kconfig" 2192source "drivers/firmware/Kconfig"
2193 2193
2194source "arch/arm/Kconfig.debug"
2195
2196if CRYPTO 2194if CRYPTO
2197source "arch/arm/crypto/Kconfig" 2195source "arch/arm/crypto/Kconfig"
2198endif 2196endif
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 693f84392f1b..b48dc083d1b1 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config ARM_PTDUMP_CORE 3config ARM_PTDUMP_CORE
7 def_bool n 4 def_bool n
@@ -1863,5 +1860,3 @@ config PID_IN_CONTEXTIDR
1863 are planning to use hardware trace tools with this kernel. 1860 are planning to use hardware trace tools with this kernel.
1864 1861
1865source "drivers/hwtracing/coresight/Kconfig" 1862source "drivers/hwtracing/coresight/Kconfig"
1866
1867endmenu
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fabd797c8645..07d457ec417a 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -1321,8 +1321,6 @@ source "drivers/acpi/Kconfig"
1321 1321
1322source "arch/arm64/kvm/Kconfig" 1322source "arch/arm64/kvm/Kconfig"
1323 1323
1324source "arch/arm64/Kconfig.debug"
1325
1326if CRYPTO 1324if CRYPTO
1327source "arch/arm64/crypto/Kconfig" 1325source "arch/arm64/crypto/Kconfig"
1328endif 1326endif
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
index cc6bd559af85..69c9170bdd24 100644
--- a/arch/arm64/Kconfig.debug
+++ b/arch/arm64/Kconfig.debug
@@ -1,6 +1,3 @@
1menu "Kernel hacking"
2
3source "lib/Kconfig.debug"
4 1
5config ARM64_PTDUMP_CORE 2config ARM64_PTDUMP_CORE
6 def_bool n 3 def_bool n
@@ -97,5 +94,3 @@ config ARM64_RELOC_TEST
97 tristate "Relocation testing module" 94 tristate "Relocation testing module"
98 95
99source "drivers/hwtracing/coresight/Kconfig" 96source "drivers/hwtracing/coresight/Kconfig"
100
101endmenu
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig
index 441bbe089b96..904b3375331e 100644
--- a/arch/c6x/Kconfig
+++ b/arch/c6x/Kconfig
@@ -115,18 +115,3 @@ source "kernel/Kconfig.preempt"
115source "kernel/Kconfig.hz" 115source "kernel/Kconfig.hz"
116 116
117endmenu 117endmenu
118
119menu "Kernel hacking"
120
121source "lib/Kconfig.debug"
122
123config 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
132endmenu
diff --git a/arch/c6x/Kconfig.debug b/arch/c6x/Kconfig.debug
new file mode 100644
index 000000000000..c299e0d8eca3
--- /dev/null
+++ b/arch/c6x/Kconfig.debug
@@ -0,0 +1,10 @@
1# SPDX-License-Identifier: GPL-2.0
2
3config 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.
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index e23cd887f8f9..c16e7cf732f7 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -55,9 +55,3 @@ menu "Kernel Features"
55source "kernel/Kconfig.preempt" 55source "kernel/Kconfig.preempt"
56 56
57endmenu 57endmenu
58
59menu "Kernel hacking"
60
61source "lib/Kconfig.debug"
62
63endmenu
diff --git a/arch/h8300/Kconfig.debug b/arch/h8300/Kconfig.debug
new file mode 100644
index 000000000000..22a162cd99e8
--- /dev/null
+++ b/arch/h8300/Kconfig.debug
@@ -0,0 +1 @@
# dummy file, do not delete
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index d2851f46a64b..fcdb6d9fcecc 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -149,7 +149,3 @@ endchoice
149source "kernel/Kconfig.hz" 149source "kernel/Kconfig.hz"
150 150
151endmenu 151endmenu
152
153menu "Kernel hacking"
154source "lib/Kconfig.debug"
155endmenu
diff --git a/arch/hexagon/Kconfig.debug b/arch/hexagon/Kconfig.debug
new file mode 100644
index 000000000000..22a162cd99e8
--- /dev/null
+++ b/arch/hexagon/Kconfig.debug
@@ -0,0 +1 @@
# dummy file, do not delete
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 6015d66fa521..34a8d24cffea 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -576,5 +576,3 @@ config MSPEC
576 If you have an ia64 and you want to enable memory special 576 If you have an ia64 and you want to enable memory special
577 operations support (formerly known as fetchop), say Y here, 577 operations support (formerly known as fetchop), say Y here,
578 otherwise say N. 578 otherwise say N.
579
580source "arch/ia64/Kconfig.debug"
diff --git a/arch/ia64/Kconfig.debug b/arch/ia64/Kconfig.debug
index 677c409425df..1371efc9b005 100644
--- a/arch/ia64/Kconfig.debug
+++ b/arch/ia64/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6choice 3choice
7 prompt "Physical memory granularity" 4 prompt "Physical memory granularity"
@@ -56,5 +53,3 @@ config IA64_DEBUG_IRQ
56 Selecting this option turns on bug checking for the IA-64 irq_save 53 Selecting this option turns on bug checking for the IA-64 irq_save
57 and restore instructions. It's useful for tracking down spinlock 54 and restore instructions. It's useful for tracking down spinlock
58 problems, but slow! If you're unsure, select N. 55 problems, but slow! If you're unsure, select N.
59
60endmenu
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index f76fb7bb371f..cf41ad45513f 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -147,5 +147,3 @@ endmenu
147endif 147endif
148 148
149source "arch/m68k/Kconfig.devices" 149source "arch/m68k/Kconfig.devices"
150
151source "arch/m68k/Kconfig.debug"
diff --git a/arch/m68k/Kconfig.debug b/arch/m68k/Kconfig.debug
index 04690b179a6e..f43643111eaf 100644
--- a/arch/m68k/Kconfig.debug
+++ b/arch/m68k/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config BOOTPARAM 3config BOOTPARAM
7 bool 'Compiled-in Kernel Boot Parameter' 4 bool 'Compiled-in Kernel Boot Parameter'
@@ -51,5 +48,3 @@ config BDM_DISABLE
51 Disable the ColdFire CPU's BDM signals. 48 Disable the ColdFire CPU's BDM signals.
52 49
53endif 50endif
54
55endmenu
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index fc31e047a43a..f4492e9478fe 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -285,5 +285,3 @@ config PCI_XILINX
285source "drivers/pci/Kconfig" 285source "drivers/pci/Kconfig"
286 286
287endmenu 287endmenu
288
289source "arch/microblaze/Kconfig.debug"
diff --git a/arch/microblaze/Kconfig.debug b/arch/microblaze/Kconfig.debug
index 93a737c8d1a6..dc2e3c45e8a2 100644
--- a/arch/microblaze/Kconfig.debug
+++ b/arch/microblaze/Kconfig.debug
@@ -1,11 +1,5 @@
1# For a description of the syntax of this configuration file, 1# For a description of the syntax of this configuration file,
2# see Documentation/kbuild/kconfig-language.txt. 2# see Documentation/kbuild/kconfig-language.txt.
3 3
4menu "Kernel hacking"
5
6config TRACE_IRQFLAGS_SUPPORT 4config TRACE_IRQFLAGS_SUPPORT
7 def_bool y 5 def_bool y
8
9source "lib/Kconfig.debug"
10
11endmenu
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index f586a3259f7f..ab02824c3976 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -3195,6 +3195,4 @@ endmenu
3195 3195
3196source "drivers/firmware/Kconfig" 3196source "drivers/firmware/Kconfig"
3197 3197
3198source "arch/mips/Kconfig.debug"
3199
3200source "arch/mips/kvm/Kconfig" 3198source "arch/mips/kvm/Kconfig"
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug
index 0749c3724543..0c86b2a2adfc 100644
--- a/arch/mips/Kconfig.debug
+++ b/arch/mips/Kconfig.debug
@@ -1,12 +1,9 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3 2
4config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
5 bool 4 bool
6 default y 5 default y
7 6
8source "lib/Kconfig.debug"
9
10config EARLY_PRINTK 7config EARLY_PRINTK
11 bool "Early printk" if EXPERT 8 bool "Early printk" if EXPERT
12 depends on SYS_HAS_EARLY_PRINTK 9 depends on SYS_HAS_EARLY_PRINTK
@@ -155,5 +152,3 @@ config MIPS_CPS_NS16550_SHIFT
155 adjacent ns16550 registers in the system. 152 adjacent ns16550 registers in the system.
156 153
157endif # MIPS_CPS_NS16550_BOOL 154endif # MIPS_CPS_NS16550_BOOL
158
159endmenu
diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig
index a9c6d25a14f0..c03d0e5a591b 100644
--- a/arch/nds32/Kconfig
+++ b/arch/nds32/Kconfig
@@ -91,7 +91,3 @@ menu "Kernel Features"
91source "kernel/Kconfig.preempt" 91source "kernel/Kconfig.preempt"
92source "kernel/Kconfig.hz" 92source "kernel/Kconfig.hz"
93endmenu 93endmenu
94
95menu "Kernel hacking"
96source "lib/Kconfig.debug"
97endmenu
diff --git a/arch/nds32/Kconfig.debug b/arch/nds32/Kconfig.debug
new file mode 100644
index 000000000000..22a162cd99e8
--- /dev/null
+++ b/arch/nds32/Kconfig.debug
@@ -0,0 +1 @@
# dummy file, do not delete
diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig
index 2d813dfdb8cb..22d19febcc92 100644
--- a/arch/nios2/Kconfig
+++ b/arch/nios2/Kconfig
@@ -187,5 +187,3 @@ config NIOS2_IO_REGION_BASE
187 default "0xe0000000" 187 default "0xe0000000"
188 188
189endmenu 189endmenu
190
191source "arch/nios2/Kconfig.debug"
diff --git a/arch/nios2/Kconfig.debug b/arch/nios2/Kconfig.debug
index edfeef049a51..7a49f0d28d14 100644
--- a/arch/nios2/Kconfig.debug
+++ b/arch/nios2/Kconfig.debug
@@ -1,11 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3 2
4config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
5 def_bool y 4 def_bool y
6 5
7source "lib/Kconfig.debug"
8
9config DEBUG_STACK_USAGE 6config DEBUG_STACK_USAGE
10 bool "Enable stack utilization instrumentation" 7 bool "Enable stack utilization instrumentation"
11 depends on DEBUG_KERNEL 8 depends on DEBUG_KERNEL
@@ -24,5 +21,3 @@ config EARLY_PRINTK
24 This is useful for kernel debugging when your machine crashes very 21 This is useful for kernel debugging when your machine crashes very
25 early before the console code is initialized. 22 early before the console code is initialized.
26 You should normally say N here, unless you want to debug such a crash. 23 You should normally say N here, unless you want to debug such a crash.
27
28endmenu
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index eb9f503c8972..c52cecd94d62 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -201,9 +201,3 @@ config OPENRISC_ESR_EXCEPTION_BUG_CHECK
201endmenu 201endmenu
202 202
203endmenu 203endmenu
204
205menu "Kernel hacking"
206
207source "lib/Kconfig.debug"
208
209endmenu
diff --git a/arch/openrisc/Kconfig.debug b/arch/openrisc/Kconfig.debug
new file mode 100644
index 000000000000..22a162cd99e8
--- /dev/null
+++ b/arch/openrisc/Kconfig.debug
@@ -0,0 +1 @@
# dummy file, do not delete
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 64b832a19bdf..d1dd56ea297b 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -349,8 +349,6 @@ endmenu
349 349
350source "drivers/parisc/Kconfig" 350source "drivers/parisc/Kconfig"
351 351
352source "arch/parisc/Kconfig.debug"
353
354config SECCOMP 352config SECCOMP
355 def_bool y 353 def_bool y
356 prompt "Enable seccomp to safely compute untrusted bytecode" 354 prompt "Enable seccomp to safely compute untrusted bytecode"
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index fb3507f9b14a..1478ded0e247 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -1,9 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
7 def_bool y 4 def_bool y
8
9endmenu
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 131132f161e5..c55e61302d57 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -1194,8 +1194,6 @@ endif
1194config ARCH_RANDOM 1194config ARCH_RANDOM
1195 def_bool n 1195 def_bool n
1196 1196
1197source "arch/powerpc/Kconfig.debug"
1198
1199config PPC_LIB_RHEAP 1197config PPC_LIB_RHEAP
1200 bool 1198 bool
1201 1199
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug
index c45424c64e19..fd63cd914a74 100644
--- a/arch/powerpc/Kconfig.debug
+++ b/arch/powerpc/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config PPC_DISABLE_WERROR 3config PPC_DISABLE_WERROR
7 bool "Don't build arch/powerpc code with -Werror" 4 bool "Don't build arch/powerpc code with -Werror"
@@ -379,5 +376,3 @@ config PPC_FAST_ENDIAN_SWITCH
379 depends on DEBUG_KERNEL && PPC_BOOK3S_64 376 depends on DEBUG_KERNEL && PPC_BOOK3S_64
380 help 377 help
381 If you're unsure what this is, say N. 378 If you're unsure what this is, say N.
382
383endmenu
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 082486cddf31..73c0e16793fa 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -245,48 +245,3 @@ menu "Power management options"
245source kernel/power/Kconfig 245source kernel/power/Kconfig
246 246
247endmenu 247endmenu
248
249menu "Kernel hacking"
250
251config 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
268config 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
275config 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
285config EARLY_PRINTK
286 def_bool y
287
288source "lib/Kconfig.debug"
289
290config CMDLINE_BOOL
291 bool
292endmenu
diff --git a/arch/riscv/Kconfig.debug b/arch/riscv/Kconfig.debug
new file mode 100644
index 000000000000..3224ff6ecf6e
--- /dev/null
+++ b/arch/riscv/Kconfig.debug
@@ -0,0 +1,37 @@
1
2config 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
19config 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
26config 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
36config EARLY_PRINTK
37 def_bool y
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index a94667712337..ac8925766d0a 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -828,8 +828,6 @@ config HAVE_PNETID
828 tristate 828 tristate
829 default (SMC || CCWGROUP) 829 default (SMC || CCWGROUP)
830 830
831source "arch/s390/Kconfig.debug"
832
833menu "Virtualization" 831menu "Virtualization"
834 832
835config PFAULT 833config PFAULT
diff --git a/arch/s390/Kconfig.debug b/arch/s390/Kconfig.debug
index 2cfdfbf8d320..190527560b2c 100644
--- a/arch/s390/Kconfig.debug
+++ b/arch/s390/Kconfig.debug
@@ -1,11 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3 2
4config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
5 def_bool y 4 def_bool y
6 5
7source "lib/Kconfig.debug"
8
9config S390_PTDUMP 6config S390_PTDUMP
10 bool "Export kernel pagetable layout to userspace via debugfs" 7 bool "Export kernel pagetable layout to userspace via debugfs"
11 depends on DEBUG_KERNEL 8 depends on DEBUG_KERNEL
@@ -20,5 +17,3 @@ config S390_PTDUMP
20 17
21config EARLY_PRINTK 18config EARLY_PRINTK
22 def_bool y 19 def_bool y
23
24endmenu
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index f291d2568cd4..c8460330eff7 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -885,5 +885,3 @@ source "kernel/power/Kconfig"
885source "drivers/cpuidle/Kconfig" 885source "drivers/cpuidle/Kconfig"
886 886
887endmenu 887endmenu
888
889source "arch/sh/Kconfig.debug"
diff --git a/arch/sh/Kconfig.debug b/arch/sh/Kconfig.debug
index d0767672640d..010b6c33bbba 100644
--- a/arch/sh/Kconfig.debug
+++ b/arch/sh/Kconfig.debug
@@ -1,11 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3 2
4config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
5 def_bool y 4 def_bool y
6 5
7source "lib/Kconfig.debug"
8
9config SH_STANDARD_BIOS 6config SH_STANDARD_BIOS
10 bool "Use LinuxSH standard BIOS" 7 bool "Use LinuxSH standard BIOS"
11 depends on SUPERH32 8 depends on SUPERH32
@@ -88,5 +85,3 @@ config MCOUNT
88 def_bool y 85 def_bool y
89 depends on SUPERH32 86 depends on SUPERH32
90 depends on STACK_DEBUG || FUNCTION_TRACER 87 depends on STACK_DEBUG || FUNCTION_TRACER
91
92endmenu
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 8a1e44d2e112..622695e8fa44 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -565,5 +565,3 @@ config SYSVIPC_COMPAT
565 default y 565 default y
566 566
567source "drivers/sbus/char/Kconfig" 567source "drivers/sbus/char/Kconfig"
568
569source "arch/sparc/Kconfig.debug"
diff --git a/arch/sparc/Kconfig.debug b/arch/sparc/Kconfig.debug
index 4aef29a11925..50a918d496c8 100644
--- a/arch/sparc/Kconfig.debug
+++ b/arch/sparc/Kconfig.debug
@@ -1,12 +1,9 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3 2
4config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
5 bool 4 bool
6 default y 5 default y
7 6
8source "lib/Kconfig.debug"
9
10config DEBUG_DCFLUSH 7config DEBUG_DCFLUSH
11 bool "D-cache flush debugging" 8 bool "D-cache flush debugging"
12 depends on SPARC64 && DEBUG_KERNEL 9 depends on SPARC64 && DEBUG_KERNEL
@@ -21,5 +18,3 @@ config FRAME_POINTER
21 bool 18 bool
22 depends on MCOUNT 19 depends on MCOUNT
23 default y 20 default y
24
25endmenu
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index a5cc2b19a960..3022d1bf9bf9 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -187,5 +187,3 @@ config SECCOMP
187endmenu 187endmenu
188 188
189source "arch/um/drivers/Kconfig" 189source "arch/um/drivers/Kconfig"
190
191source "arch/um/Kconfig.debug"
diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug
index 967d3109689f..2014597605ea 100644
--- a/arch/um/Kconfig.debug
+++ b/arch/um/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config GPROF 3config GPROF
7 bool "Enable gprof support" 4 bool "Enable gprof support"
@@ -37,5 +34,3 @@ config EARLY_PRINTK
37 34
38 This is useful for kernel debugging when your machine crashes very 35 This is useful for kernel debugging when your machine crashes very
39 early before the console code is initialized. 36 early before the console code is initialized.
40
41endmenu
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 7fa7e61eb19f..6bfaa4a910e1 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -222,5 +222,3 @@ endmenu
222endif 222endif
223 223
224endif 224endif
225
226source "arch/unicore32/Kconfig.debug"
diff --git a/arch/unicore32/Kconfig.debug b/arch/unicore32/Kconfig.debug
index de8dae3abc0a..ca0ff97657ef 100644
--- a/arch/unicore32/Kconfig.debug
+++ b/arch/unicore32/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config EARLY_PRINTK 3config EARLY_PRINTK
7 def_bool DEBUG_OCD 4 def_bool DEBUG_OCD
@@ -30,5 +27,3 @@ config DEBUG_OCD
30 help 27 help
31 Say Y here if you want the debug print routines to direct their 28 Say Y here if you want the debug print routines to direct their
32 output to the UniCore On-Chip-Debugger channel using CP #1. 29 output to the UniCore On-Chip-Debugger channel using CP #1.
33
34endmenu
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 6faefd1c9f13..41d28b430fef 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -2931,6 +2931,4 @@ config HAVE_GENERIC_GUP
2931 2931
2932source "drivers/firmware/Kconfig" 2932source "drivers/firmware/Kconfig"
2933 2933
2934source "arch/x86/Kconfig.debug"
2935
2936source "arch/x86/kvm/Kconfig" 2934source "arch/x86/kvm/Kconfig"
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index c6dd1d980081..7d68f0c7cfb1 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -1,11 +1,8 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3 2
4config TRACE_IRQFLAGS_SUPPORT 3config TRACE_IRQFLAGS_SUPPORT
5 def_bool y 4 def_bool y
6 5
7source "lib/Kconfig.debug"
8
9config EARLY_PRINTK_USB 6config EARLY_PRINTK_USB
10 bool 7 bool
11 8
@@ -410,5 +407,3 @@ endchoice
410config FRAME_POINTER 407config FRAME_POINTER
411 depends on !UNWINDER_ORC && !UNWINDER_GUESS 408 depends on !UNWINDER_ORC && !UNWINDER_GUESS
412 bool 409 bool
413
414endmenu
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index d8bac8be3a33..aae0e1800be7 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -567,5 +567,3 @@ menu "Power management options"
567source "kernel/power/Kconfig" 567source "kernel/power/Kconfig"
568 568
569endmenu 569endmenu
570
571source "arch/xtensa/Kconfig.debug"
diff --git a/arch/xtensa/Kconfig.debug b/arch/xtensa/Kconfig.debug
index f64c14adadb3..39de98e20018 100644
--- a/arch/xtensa/Kconfig.debug
+++ b/arch/xtensa/Kconfig.debug
@@ -1,7 +1,4 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2menu "Kernel hacking"
3
4source "lib/Kconfig.debug"
5 2
6config DEBUG_TLB_SANITY 3config DEBUG_TLB_SANITY
7 bool "Debug TLB sanity" 4 bool "Debug TLB sanity"
@@ -34,5 +31,3 @@ config S32C1I_SELFTEST
34 It is easy to make wrong hardware configuration, this test should catch it early. 31 It is easy to make wrong hardware configuration, this test should catch it early.
35 32
36 Say 'N' on stable hardware. 33 Say 'N' on stable hardware.
37
38endmenu
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 8838d1158d19..26d3ff7e3cf4 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1,3 +1,5 @@
1menu "Kernel hacking"
2
1menu "printk and dmesg options" 3menu "printk and dmesg options"
2 4
3config PRINTK_TIME 5config PRINTK_TIME
@@ -2034,3 +2036,7 @@ config IO_STRICT_DEVMEM
2034 if the driver using a given range cannot be disabled. 2036 if the driver using a given range cannot be disabled.
2035 2037
2036 If in doubt, say Y. 2038 If in doubt, say Y.
2039
2040source "arch/$(SRCARCH)/Kconfig.debug"
2041
2042endmenu # Kernel hacking