Skip to content

Commit

Permalink
Kconfig: consolidate the "Kernel hacking" menu
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
Christoph Hellwig authored and masahir0y committed Aug 1, 2018
1 parent 1572497 commit 06ec64b
Show file tree
Hide file tree
Showing 50 changed files with 59 additions and 206 deletions.
2 changes: 2 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ source "security/Kconfig"
source "crypto/Kconfig"

source "lib/Kconfig"

source "lib/Kconfig.debug"
2 changes: 0 additions & 2 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,6 @@ config SRM_ENV

endmenu

source "arch/alpha/Kconfig.debug"

# DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig
# but we also need it if VGA_HOSE is set
config DUMMY_CONSOLE
Expand Down
5 changes: 0 additions & 5 deletions arch/alpha/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

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

endmenu
1 change: 0 additions & 1 deletion arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -574,5 +574,4 @@ source "drivers/pci/Kconfig"

endmenu

source "arch/arc/Kconfig.debug"
source "kernel/power/Kconfig"
5 changes: 0 additions & 5 deletions arch/arc/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

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

endmenu
2 changes: 0 additions & 2 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2191,8 +2191,6 @@ endmenu

source "drivers/firmware/Kconfig"

source "arch/arm/Kconfig.debug"

if CRYPTO
source "arch/arm/crypto/Kconfig"
endif
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

config ARM_PTDUMP_CORE
def_bool n
Expand Down Expand Up @@ -1863,5 +1860,3 @@ config PID_IN_CONTEXTIDR
are planning to use hardware trace tools with this kernel.

source "drivers/hwtracing/coresight/Kconfig"

endmenu
2 changes: 0 additions & 2 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,6 @@ source "drivers/acpi/Kconfig"

source "arch/arm64/kvm/Kconfig"

source "arch/arm64/Kconfig.debug"

if CRYPTO
source "arch/arm64/crypto/Kconfig"
endif
5 changes: 0 additions & 5 deletions arch/arm64/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
menu "Kernel hacking"

source "lib/Kconfig.debug"

config ARM64_PTDUMP_CORE
def_bool n
Expand Down Expand Up @@ -97,5 +94,3 @@ config ARM64_RELOC_TEST
tristate "Relocation testing module"

source "drivers/hwtracing/coresight/Kconfig"

endmenu
15 changes: 0 additions & 15 deletions arch/c6x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,3 @@ source "kernel/Kconfig.preempt"
source "kernel/Kconfig.hz"

endmenu

menu "Kernel hacking"

source "lib/Kconfig.debug"

config ACCESS_CHECK
bool "Check the user pointer address"
default y
help
Usually the pointer transfer from user space is checked to see if its
address is in the kernel space.

Say N here to disable that check to improve the performance.

endmenu
10 changes: 10 additions & 0 deletions arch/c6x/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-License-Identifier: GPL-2.0

config ACCESS_CHECK
bool "Check the user pointer address"
default y
help
Usually the pointer transfer from user space is checked to see if its
address is in the kernel space.

Say N here to disable that check to improve the performance.
6 changes: 0 additions & 6 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,3 @@ menu "Kernel Features"
source "kernel/Kconfig.preempt"

endmenu

menu "Kernel hacking"

source "lib/Kconfig.debug"

endmenu
1 change: 1 addition & 0 deletions arch/h8300/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# dummy file, do not delete
4 changes: 0 additions & 4 deletions arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,3 @@ endchoice
source "kernel/Kconfig.hz"

endmenu

menu "Kernel hacking"
source "lib/Kconfig.debug"
endmenu
1 change: 1 addition & 0 deletions arch/hexagon/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# dummy file, do not delete
2 changes: 0 additions & 2 deletions arch/ia64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -576,5 +576,3 @@ config MSPEC
If you have an ia64 and you want to enable memory special
operations support (formerly known as fetchop), say Y here,
otherwise say N.

source "arch/ia64/Kconfig.debug"
5 changes: 0 additions & 5 deletions arch/ia64/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

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

endmenu
2 changes: 0 additions & 2 deletions arch/m68k/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,3 @@ endmenu
endif

source "arch/m68k/Kconfig.devices"

source "arch/m68k/Kconfig.debug"
5 changes: 0 additions & 5 deletions arch/m68k/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

config BOOTPARAM
bool 'Compiled-in Kernel Boot Parameter'
Expand Down Expand Up @@ -51,5 +48,3 @@ config BDM_DISABLE
Disable the ColdFire CPU's BDM signals.

endif

endmenu
2 changes: 0 additions & 2 deletions arch/microblaze/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -285,5 +285,3 @@ config PCI_XILINX
source "drivers/pci/Kconfig"

endmenu

source "arch/microblaze/Kconfig.debug"
6 changes: 0 additions & 6 deletions arch/microblaze/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
# For a description of the syntax of this configuration file,
# see Documentation/kbuild/kconfig-language.txt.

menu "Kernel hacking"

config TRACE_IRQFLAGS_SUPPORT
def_bool y

source "lib/Kconfig.debug"

endmenu
2 changes: 0 additions & 2 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3195,6 +3195,4 @@ endmenu

source "drivers/firmware/Kconfig"

source "arch/mips/Kconfig.debug"

source "arch/mips/kvm/Kconfig"
5 changes: 0 additions & 5 deletions arch/mips/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

config TRACE_IRQFLAGS_SUPPORT
bool
default y

source "lib/Kconfig.debug"

config EARLY_PRINTK
bool "Early printk" if EXPERT
depends on SYS_HAS_EARLY_PRINTK
Expand Down Expand Up @@ -155,5 +152,3 @@ config MIPS_CPS_NS16550_SHIFT
adjacent ns16550 registers in the system.

endif # MIPS_CPS_NS16550_BOOL

endmenu
4 changes: 0 additions & 4 deletions arch/nds32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,3 @@ menu "Kernel Features"
source "kernel/Kconfig.preempt"
source "kernel/Kconfig.hz"
endmenu

menu "Kernel hacking"
source "lib/Kconfig.debug"
endmenu
1 change: 1 addition & 0 deletions arch/nds32/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# dummy file, do not delete
2 changes: 0 additions & 2 deletions arch/nios2/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,3 @@ config NIOS2_IO_REGION_BASE
default "0xe0000000"

endmenu

source "arch/nios2/Kconfig.debug"
5 changes: 0 additions & 5 deletions arch/nios2/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

config TRACE_IRQFLAGS_SUPPORT
def_bool y

source "lib/Kconfig.debug"

config DEBUG_STACK_USAGE
bool "Enable stack utilization instrumentation"
depends on DEBUG_KERNEL
Expand All @@ -24,5 +21,3 @@ config EARLY_PRINTK
This is useful for kernel debugging when your machine crashes very
early before the console code is initialized.
You should normally say N here, unless you want to debug such a crash.

endmenu
6 changes: 0 additions & 6 deletions arch/openrisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,3 @@ config OPENRISC_ESR_EXCEPTION_BUG_CHECK
endmenu

endmenu

menu "Kernel hacking"

source "lib/Kconfig.debug"

endmenu
1 change: 1 addition & 0 deletions arch/openrisc/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# dummy file, do not delete
2 changes: 0 additions & 2 deletions arch/parisc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@ endmenu

source "drivers/parisc/Kconfig"

source "arch/parisc/Kconfig.debug"

config SECCOMP
def_bool y
prompt "Enable seccomp to safely compute untrusted bytecode"
Expand Down
5 changes: 0 additions & 5 deletions arch/parisc/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

config TRACE_IRQFLAGS_SUPPORT
def_bool y

endmenu
2 changes: 0 additions & 2 deletions arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,6 @@ endif
config ARCH_RANDOM
def_bool n

source "arch/powerpc/Kconfig.debug"

config PPC_LIB_RHEAP
bool

Expand Down
5 changes: 0 additions & 5 deletions arch/powerpc/Kconfig.debug
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# SPDX-License-Identifier: GPL-2.0
menu "Kernel hacking"

source "lib/Kconfig.debug"

config PPC_DISABLE_WERROR
bool "Don't build arch/powerpc code with -Werror"
Expand Down Expand Up @@ -379,5 +376,3 @@ config PPC_FAST_ENDIAN_SWITCH
depends on DEBUG_KERNEL && PPC_BOOK3S_64
help
If you're unsure what this is, say N.

endmenu
45 changes: 0 additions & 45 deletions arch/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -245,48 +245,3 @@ menu "Power management options"
source kernel/power/Kconfig

endmenu

menu "Kernel hacking"

config CMDLINE_BOOL
bool "Built-in kernel command line"
help
For most platforms, it is firmware or second stage bootloader
that by default specifies the kernel command line options.
However, it might be necessary or advantageous to either override
the default kernel command line or add a few extra options to it.
For such cases, this option allows hardcoding command line options
directly into the kernel.

For that, choose 'Y' here and fill in the extra boot parameters
in CONFIG_CMDLINE.

The built-in options will be concatenated to the default command
line if CMDLINE_FORCE is set to 'N'. Otherwise, the default
command line will be ignored and replaced by the built-in string.

config CMDLINE
string "Built-in kernel command string"
depends on CMDLINE_BOOL
default ""
help
Supply command-line options at build time by entering them here.

config CMDLINE_FORCE
bool "Built-in command line overrides bootloader arguments"
depends on CMDLINE_BOOL
help
Set this option to 'Y' to have the kernel ignore the bootloader
or firmware command line. Instead, the built-in command line
will be used exclusively.

If you don't know what to do here, say N.

config EARLY_PRINTK
def_bool y

source "lib/Kconfig.debug"

config CMDLINE_BOOL
bool
endmenu
Loading

0 comments on commit 06ec64b

Please sign in to comment.