Skip to content

Commit 06ec64b

Browse files
Christoph Hellwigmasahir0y
authored andcommitted
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>
1 parent 1572497 commit 06ec64b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+59
-206
lines changed

Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,5 @@ source "security/Kconfig"
3030
source "crypto/Kconfig"
3131

3232
source "lib/Kconfig"
33+
34+
source "lib/Kconfig.debug"

arch/alpha/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -710,8 +710,6 @@ config SRM_ENV
710710

711711
endmenu
712712

713-
source "arch/alpha/Kconfig.debug"
714-
715713
# DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig
716714
# but we also need it if VGA_HOSE is set
717715
config DUMMY_CONSOLE

arch/alpha/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
config EARLY_PRINTK
74
bool
@@ -39,5 +36,3 @@ config MATHEMU
3936
This option is required for IEEE compliant floating point arithmetic
4037
on the Alpha. The only time you would ever not say Y is to say M in
4138
order to debug the code. Say Y unless you know what you are doing.
42-
43-
endmenu

arch/arc/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,5 +574,4 @@ source "drivers/pci/Kconfig"
574574

575575
endmenu
576576

577-
source "arch/arc/Kconfig.debug"
578577
source "kernel/power/Kconfig"

arch/arc/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
config 16KSTACKS
74
bool "Use 16Kb for kernel stacks instead of 8Kb"
@@ -11,5 +8,3 @@ config 16KSTACKS
118
This increases the resident kernel footprint and will cause less
129
threads to run on the system and also increase the pressure
1310
on the VM subsystem for higher order allocations.
14-
15-
endmenu

arch/arm/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2191,8 +2191,6 @@ endmenu
21912191

21922192
source "drivers/firmware/Kconfig"
21932193

2194-
source "arch/arm/Kconfig.debug"
2195-
21962194
if CRYPTO
21972195
source "arch/arm/crypto/Kconfig"
21982196
endif

arch/arm/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
config ARM_PTDUMP_CORE
74
def_bool n
@@ -1863,5 +1860,3 @@ config PID_IN_CONTEXTIDR
18631860
are planning to use hardware trace tools with this kernel.
18641861

18651862
source "drivers/hwtracing/coresight/Kconfig"
1866-
1867-
endmenu

arch/arm64/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1321,8 +1321,6 @@ source "drivers/acpi/Kconfig"
13211321

13221322
source "arch/arm64/kvm/Kconfig"
13231323

1324-
source "arch/arm64/Kconfig.debug"
1325-
13261324
if CRYPTO
13271325
source "arch/arm64/crypto/Kconfig"
13281326
endif

arch/arm64/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
menu "Kernel hacking"
2-
3-
source "lib/Kconfig.debug"
41

52
config ARM64_PTDUMP_CORE
63
def_bool n
@@ -97,5 +94,3 @@ config ARM64_RELOC_TEST
9794
tristate "Relocation testing module"
9895

9996
source "drivers/hwtracing/coresight/Kconfig"
100-
101-
endmenu

arch/c6x/Kconfig

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,3 @@ source "kernel/Kconfig.preempt"
115115
source "kernel/Kconfig.hz"
116116

117117
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

arch/c6x/Kconfig.debug

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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.

arch/h8300/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,3 @@ menu "Kernel Features"
5555
source "kernel/Kconfig.preempt"
5656

5757
endmenu
58-
59-
menu "Kernel hacking"
60-
61-
source "lib/Kconfig.debug"
62-
63-
endmenu

arch/h8300/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# dummy file, do not delete

arch/hexagon/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,3 @@ endchoice
149149
source "kernel/Kconfig.hz"
150150

151151
endmenu
152-
153-
menu "Kernel hacking"
154-
source "lib/Kconfig.debug"
155-
endmenu

arch/hexagon/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# dummy file, do not delete

arch/ia64/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,5 +576,3 @@ config MSPEC
576576
If you have an ia64 and you want to enable memory special
577577
operations support (formerly known as fetchop), say Y here,
578578
otherwise say N.
579-
580-
source "arch/ia64/Kconfig.debug"

arch/ia64/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
choice
74
prompt "Physical memory granularity"
@@ -56,5 +53,3 @@ config IA64_DEBUG_IRQ
5653
Selecting this option turns on bug checking for the IA-64 irq_save
5754
and restore instructions. It's useful for tracking down spinlock
5855
problems, but slow! If you're unsure, select N.
59-
60-
endmenu

arch/m68k/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,3 @@ endmenu
147147
endif
148148

149149
source "arch/m68k/Kconfig.devices"
150-
151-
source "arch/m68k/Kconfig.debug"

arch/m68k/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
config BOOTPARAM
74
bool 'Compiled-in Kernel Boot Parameter'
@@ -51,5 +48,3 @@ config BDM_DISABLE
5148
Disable the ColdFire CPU's BDM signals.
5249

5350
endif
54-
55-
endmenu

arch/microblaze/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,5 +285,3 @@ config PCI_XILINX
285285
source "drivers/pci/Kconfig"
286286

287287
endmenu
288-
289-
source "arch/microblaze/Kconfig.debug"

arch/microblaze/Kconfig.debug

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# For a description of the syntax of this configuration file,
22
# see Documentation/kbuild/kconfig-language.txt.
33

4-
menu "Kernel hacking"
5-
64
config TRACE_IRQFLAGS_SUPPORT
75
def_bool y
8-
9-
source "lib/Kconfig.debug"
10-
11-
endmenu

arch/mips/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3195,6 +3195,4 @@ endmenu
31953195

31963196
source "drivers/firmware/Kconfig"
31973197

3198-
source "arch/mips/Kconfig.debug"
3199-
32003198
source "arch/mips/kvm/Kconfig"

arch/mips/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
32

43
config TRACE_IRQFLAGS_SUPPORT
54
bool
65
default y
76

8-
source "lib/Kconfig.debug"
9-
107
config EARLY_PRINTK
118
bool "Early printk" if EXPERT
129
depends on SYS_HAS_EARLY_PRINTK
@@ -155,5 +152,3 @@ config MIPS_CPS_NS16550_SHIFT
155152
adjacent ns16550 registers in the system.
156153

157154
endif # MIPS_CPS_NS16550_BOOL
158-
159-
endmenu

arch/nds32/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,3 @@ menu "Kernel Features"
9191
source "kernel/Kconfig.preempt"
9292
source "kernel/Kconfig.hz"
9393
endmenu
94-
95-
menu "Kernel hacking"
96-
source "lib/Kconfig.debug"
97-
endmenu

arch/nds32/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# dummy file, do not delete

arch/nios2/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,3 @@ config NIOS2_IO_REGION_BASE
187187
default "0xe0000000"
188188

189189
endmenu
190-
191-
source "arch/nios2/Kconfig.debug"

arch/nios2/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
32

43
config TRACE_IRQFLAGS_SUPPORT
54
def_bool y
65

7-
source "lib/Kconfig.debug"
8-
96
config DEBUG_STACK_USAGE
107
bool "Enable stack utilization instrumentation"
118
depends on DEBUG_KERNEL
@@ -24,5 +21,3 @@ config EARLY_PRINTK
2421
This is useful for kernel debugging when your machine crashes very
2522
early before the console code is initialized.
2623
You should normally say N here, unless you want to debug such a crash.
27-
28-
endmenu

arch/openrisc/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,3 @@ config OPENRISC_ESR_EXCEPTION_BUG_CHECK
201201
endmenu
202202

203203
endmenu
204-
205-
menu "Kernel hacking"
206-
207-
source "lib/Kconfig.debug"
208-
209-
endmenu

arch/openrisc/Kconfig.debug

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# dummy file, do not delete

arch/parisc/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,6 @@ endmenu
349349

350350
source "drivers/parisc/Kconfig"
351351

352-
source "arch/parisc/Kconfig.debug"
353-
354352
config SECCOMP
355353
def_bool y
356354
prompt "Enable seccomp to safely compute untrusted bytecode"

arch/parisc/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
config TRACE_IRQFLAGS_SUPPORT
74
def_bool y
8-
9-
endmenu

arch/powerpc/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,8 +1194,6 @@ endif
11941194
config ARCH_RANDOM
11951195
def_bool n
11961196

1197-
source "arch/powerpc/Kconfig.debug"
1198-
11991197
config PPC_LIB_RHEAP
12001198
bool
12011199

arch/powerpc/Kconfig.debug

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
menu "Kernel hacking"
3-
4-
source "lib/Kconfig.debug"
52

63
config PPC_DISABLE_WERROR
74
bool "Don't build arch/powerpc code with -Werror"
@@ -379,5 +376,3 @@ config PPC_FAST_ENDIAN_SWITCH
379376
depends on DEBUG_KERNEL && PPC_BOOK3S_64
380377
help
381378
If you're unsure what this is, say N.
382-
383-
endmenu

arch/riscv/Kconfig

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -245,48 +245,3 @@ menu "Power management options"
245245
source kernel/power/Kconfig
246246

247247
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

0 commit comments

Comments
 (0)