Skip to content

Commit

Permalink
kconfig: include common Kconfig files from top-level Kconfig
Browse files Browse the repository at this point in the history
Instead of duplicating the source statements in every architecture just
do it once in the toplevel Kconfig file.

Note that with this the inclusion of arch/$(SRCARCH/Kconfig moves out of
the top-level Kconfig into arch/Kconfig so that don't violate ordering
constraits while keeping a sensible menu structure.

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 17c46a6 commit 1572497
Show file tree
Hide file tree
Showing 28 changed files with 30 additions and 533 deletions.
22 changes: 21 additions & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,24 @@ comment "Compiler: $(CC_VERSION_TEXT)"

source "scripts/Kconfig.include"

source "arch/$(SRCARCH)/Kconfig"
source "init/Kconfig"

source "kernel/Kconfig.freezer"

menu "Executable file formats"
source "fs/Kconfig.binfmt"
endmenu

source "mm/Kconfig"

source "net/Kconfig"

source "drivers/Kconfig"

source "fs/Kconfig"

source "security/Kconfig"

source "crypto/Kconfig"

source "lib/Kconfig"
6 changes: 6 additions & 0 deletions arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
# General architecture dependent options
#

#
# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can
# override the default values in this file.
#
source "arch/$(SRCARCH)/Kconfig"

config CRASH_CORE
bool

Expand Down
20 changes: 0 additions & 20 deletions arch/alpha/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ config PGTABLE_LEVELS
int
default 3

source "init/Kconfig"
source "kernel/Kconfig.freezer"

config AUDIT_ARCH
bool

Expand Down Expand Up @@ -573,8 +570,6 @@ config ARCH_DISCONTIGMEM_ENABLE
or have huge holes in the physical address space for other reasons.
See <file:Documentation/vm/numa.rst> for more.

source "mm/Kconfig"

config NUMA
bool "NUMA Support (EXPERIMENTAL)"
depends on DISCONTIGMEM && BROKEN
Expand Down Expand Up @@ -713,16 +708,8 @@ config SRM_ENV
This driver is also available as a module and will be called
srm_env then.

source "fs/Kconfig.binfmt"

endmenu

source "net/Kconfig"

source "drivers/Kconfig"

source "fs/Kconfig"

source "arch/alpha/Kconfig.debug"

# DUMMY_CONSOLE may be defined in drivers/video/console/Kconfig
Expand All @@ -731,10 +718,3 @@ config DUMMY_CONSOLE
bool
depends on VGA_HOSE
default y

source "security/Kconfig"

source "crypto/Kconfig"

source "lib/Kconfig"

16 changes: 0 additions & 16 deletions arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ config HAVE_ARCH_TRANSPARENT_HUGEPAGE
def_bool y
depends on ARC_MMU_V4

source "init/Kconfig"
source "kernel/Kconfig.freezer"

menu "ARC Architecture Configuration"

menu "ARC Platform/SoC/Board"
Expand Down Expand Up @@ -550,22 +547,13 @@ config ARC_BUILTIN_DTB_NAME

source "kernel/Kconfig.preempt"

menu "Executable file formats"
source "fs/Kconfig.binfmt"
endmenu

endmenu # "ARC Architecture Configuration"

source "mm/Kconfig"

config FORCE_MAX_ZONEORDER
int "Maximum zone order"
default "12" if ARC_HUGEPAGE_16M
default "11"

source "net/Kconfig"
source "drivers/Kconfig"

menu "Bus Support"

config PCI
Expand All @@ -586,9 +574,5 @@ source "drivers/pci/Kconfig"

endmenu

source "fs/Kconfig"
source "arch/arc/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"
source "kernel/power/Kconfig"
23 changes: 0 additions & 23 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,6 @@ config PGTABLE_LEVELS
default 3 if ARM_LPAE
default 2

source "init/Kconfig"

source "kernel/Kconfig.freezer"

menu "System Type"

config MMU
Expand Down Expand Up @@ -1721,8 +1717,6 @@ config ARM_MODULE_PLTS
Disabling this is usually safe for small single-platform
configurations. If unsure, say y.

source "mm/Kconfig"

config FORCE_MAX_ZONEORDER
int "Maximum zone order"
default "12" if SOC_AM33XX
Expand Down Expand Up @@ -2175,12 +2169,6 @@ config KERNEL_MODE_NEON

endmenu

menu "Userspace binary formats"

source "fs/Kconfig.binfmt"

endmenu

menu "Power management options"

source "kernel/power/Kconfig"
Expand All @@ -2201,23 +2189,12 @@ config ARCH_HIBERNATION_POSSIBLE

endmenu

source "net/Kconfig"

source "drivers/Kconfig"

source "drivers/firmware/Kconfig"

source "fs/Kconfig"

source "arch/arm/Kconfig.debug"

source "security/Kconfig"

source "crypto/Kconfig"
if CRYPTO
source "arch/arm/crypto/Kconfig"
endif

source "lib/Kconfig"

source "arch/arm/kvm/Kconfig"
23 changes: 0 additions & 23 deletions arch/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,6 @@ config ARCH_PROC_KCORE_TEXT
config MULTI_IRQ_HANDLER
def_bool y

source "init/Kconfig"

source "kernel/Kconfig.freezer"

source "arch/arm64/Kconfig.platforms"

menu "Bus support"
Expand Down Expand Up @@ -791,8 +787,6 @@ config ARCH_WANT_HUGE_PMD_SHARE
config ARCH_HAS_CACHE_LINE_SIZE
def_bool y

source "mm/Kconfig"

config SECCOMP
bool "Enable seccomp to safely compute untrusted bytecode"
---help---
Expand Down Expand Up @@ -1273,10 +1267,6 @@ config DMI

endmenu

menu "Userspace binary formats"

source "fs/Kconfig.binfmt"

config COMPAT
bool "Kernel support for 32-bit EL0"
depends on ARM64_4K_PAGES || EXPERT
Expand All @@ -1300,8 +1290,6 @@ config SYSVIPC_COMPAT
def_bool y
depends on COMPAT && SYSVIPC

endmenu

menu "Power management options"

source "kernel/power/Kconfig"
Expand All @@ -1327,25 +1315,14 @@ source "drivers/cpufreq/Kconfig"

endmenu

source "net/Kconfig"

source "drivers/Kconfig"

source "drivers/firmware/Kconfig"

source "drivers/acpi/Kconfig"

source "fs/Kconfig"

source "arch/arm64/kvm/Kconfig"

source "arch/arm64/Kconfig.debug"

source "security/Kconfig"

source "crypto/Kconfig"
if CRYPTO
source "arch/arm64/crypto/Kconfig"
endif

source "lib/Kconfig"
24 changes: 0 additions & 24 deletions arch/c6x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ config C6X_BIG_KERNEL

If unsure, say N.

source "init/Kconfig"

# Use the generic interrupt handling code in kernel/irq/

source "kernel/Kconfig.freezer"

config CMDLINE_BOOL
bool "Default bootloader kernel arguments"

Expand Down Expand Up @@ -114,32 +110,12 @@ config KERNEL_RAM_BASE_ADDRESS
default 0xe0000000 if SOC_TMS320C6472
default 0x80000000

source "mm/Kconfig"

source "kernel/Kconfig.preempt"

source "kernel/Kconfig.hz"

endmenu

menu "Executable file formats"

source "fs/Kconfig.binfmt"

endmenu

source "net/Kconfig"

source "drivers/Kconfig"

source "fs/Kconfig"

source "security/Kconfig"

source "crypto/Kconfig"

source "lib/Kconfig"

menu "Kernel hacking"

source "lib/Kconfig.debug"
Expand Down
24 changes: 0 additions & 24 deletions arch/h8300/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -48,40 +48,16 @@ config NR_CPUS
int
default 1

source "init/Kconfig"

source "kernel/Kconfig.freezer"

source "arch/h8300/Kconfig.cpu"

menu "Kernel Features"

source "kernel/Kconfig.preempt"

source "mm/Kconfig"

endmenu

menu "Executable file formats"

source "fs/Kconfig.binfmt"

endmenu

source "net/Kconfig"

source "drivers/Kconfig"

source "fs/Kconfig"

menu "Kernel hacking"

source "lib/Kconfig.debug"

endmenu

source "security/Kconfig"

source "crypto/Kconfig"

source "lib/Kconfig"
16 changes: 0 additions & 16 deletions arch/hexagon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -146,26 +146,10 @@ config PAGE_SIZE_256KB

endchoice

source "mm/Kconfig"

source "kernel/Kconfig.hz"

endmenu

source "init/Kconfig"
source "kernel/Kconfig.freezer"
source "drivers/Kconfig"
source "fs/Kconfig"

menu "Executable File Formats"
source "fs/Kconfig.binfmt"
endmenu

source "net/Kconfig"
source "security/Kconfig"
source "crypto/Kconfig"
source "lib/Kconfig"

menu "Kernel hacking"
source "lib/Kconfig.debug"
endmenu
Loading

0 comments on commit 1572497

Please sign in to comment.