Commit 5d2acfc7 authored by Josh Triplett's avatar Josh Triplett Committed by Linus Torvalds
Browse files

kconfig: make allnoconfig disable options behind EMBEDDED and EXPERT



"make allnoconfig" exists to ease testing of minimal configurations.
Documentation/SubmitChecklist includes a note to test with allnoconfig.
This helps catch missing dependencies on common-but-not-required
functionality, which might otherwise go unnoticed.

However, allnoconfig still leaves many symbols enabled, because they're
hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT.  For instance, allnoconfig
still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't
typically get build-tested with those disabled.

To address this, introduce a new Kconfig option "allnoconfig_y", used on
symbols which only exist to hide other symbols.  Set it on CONFIG_EMBEDDED
(which then selects CONFIG_EXPERT).  allnoconfig will then disable all the
symbols hidden behind those.

Signed-off-by: default avatarJosh Triplett <josh@joshtriplett.org>
Tested-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 527518f1
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -157,6 +157,10 @@ applicable everywhere (see syntax).
    to the build environment (if this is desired, it can be done via
    to the build environment (if this is desired, it can be done via
    another symbol).
    another symbol).


  - "allnoconfig_y"
    This declares the symbol as one that should have the value y when
    using "allnoconfig". Used for symbols that hide other symbols.

Menu dependencies
Menu dependencies
-----------------
-----------------


+1 −0
Original line number Original line Diff line number Diff line
@@ -1483,6 +1483,7 @@ config PCI_QUIRKS


config EMBEDDED
config EMBEDDED
	bool "Embedded system"
	bool "Embedded system"
	option allnoconfig_y
	select EXPERT
	select EXPERT
	help
	help
	  This option should be enabled if compiling the kernel for
	  This option should be enabled if compiling the kernel for
+4 −1
Original line number Original line Diff line number Diff line
@@ -1178,6 +1178,9 @@ bool conf_set_all_new_symbols(enum conf_def_mode mode)
				sym->def[S_DEF_USER].tri = mod;
				sym->def[S_DEF_USER].tri = mod;
				break;
				break;
			case def_no:
			case def_no:
				if (sym->flags & SYMBOL_ALLNOCONFIG_Y)
					sym->def[S_DEF_USER].tri = yes;
				else
					sym->def[S_DEF_USER].tri = no;
					sym->def[S_DEF_USER].tri = no;
				break;
				break;
			case def_random:
			case def_random:
+3 −0
Original line number Original line Diff line number Diff line
@@ -109,6 +109,9 @@ struct symbol {
/* choice values need to be set before calculating this symbol value */
/* choice values need to be set before calculating this symbol value */
#define SYMBOL_NEED_SET_CHOICE_VALUES  0x100000
#define SYMBOL_NEED_SET_CHOICE_VALUES  0x100000


/* Set symbol to y if allnoconfig; used for symbols that hide others */
#define SYMBOL_ALLNOCONFIG_Y 0x200000

#define SYMBOL_MAXLENGTH	256
#define SYMBOL_MAXLENGTH	256
#define SYMBOL_HASHSIZE		9973
#define SYMBOL_HASHSIZE		9973


+1 −0
Original line number Original line Diff line number Diff line
@@ -61,6 +61,7 @@ enum conf_def_mode {
#define T_OPT_MODULES		1
#define T_OPT_MODULES		1
#define T_OPT_DEFCONFIG_LIST	2
#define T_OPT_DEFCONFIG_LIST	2
#define T_OPT_ENV		3
#define T_OPT_ENV		3
#define T_OPT_ALLNOCONFIG_Y	4


struct kconf_id {
struct kconf_id {
	int name;
	int name;
Loading