- kconfig-add-defconfig_list-module-option.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     kconfig: add defconfig_list/module option

has been removed from the -mm tree.  Its filename is

     kconfig-add-defconfig_list-module-option.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: kconfig: add defconfig_list/module option
From: Roman Zippel <zippel@xxxxxxxxxxxxxx>


This makes it possible to change two options which were hardcoded sofar.
1. Any symbol can now take the role of CONFIG_MODULES
2. The more useful option is to change the list of default file names,
   which kconfig uses to load the base configuration if .config isn't
   available.

Signed-off-by: Roman Zippel <zippel@xxxxxxxxxxxxxx>
Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 init/Kconfig                        |    8 ++++++++
 scripts/kconfig/confdata.c          |   26 +++++++++++---------------
 scripts/kconfig/expr.h              |    1 +
 scripts/kconfig/lkc.h               |    1 +
 scripts/kconfig/menu.c              |   14 ++++++++++++++
 scripts/kconfig/symbol.c            |   15 ++++++++-------
 scripts/kconfig/zconf.tab.c_shipped |   10 +++++++++-
 scripts/kconfig/zconf.y             |   10 +++++++++-
 8 files changed, 61 insertions(+), 24 deletions(-)

diff -puN init/Kconfig~kconfig-add-defconfig_list-module-option init/Kconfig
--- devel/init/Kconfig~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/init/Kconfig	2006-04-09 23:44:45.000000000 -0700
@@ -1,3 +1,11 @@
+config DEFCONFIG_LIST
+	string
+	option defconfig_list
+	default "/lib/modules/$UNAME_RELEASE/.config"
+	default "/etc/kernel-config"
+	default "/boot/config-$UNAME_RELEASE"
+	default "arch/$ARCH/defconfig"
+
 menu "Code maturity level options"
 
 config EXPERIMENTAL
diff -puN scripts/kconfig/confdata.c~kconfig-add-defconfig_list-module-option scripts/kconfig/confdata.c
--- devel/scripts/kconfig/confdata.c~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/confdata.c	2006-04-09 23:44:45.000000000 -0700
@@ -25,15 +25,6 @@ const char conf_def_filename[] = ".confi
 
 const char conf_defname[] = "arch/$ARCH/defconfig";
 
-const char *conf_confnames[] = {
-	".config",
-	"/lib/modules/$UNAME_RELEASE/.config",
-	"/etc/kernel-config",
-	"/boot/config-$UNAME_RELEASE",
-	conf_defname,
-	NULL,
-};
-
 static void conf_warning(const char *fmt, ...)
 {
 	va_list ap;
@@ -98,16 +89,21 @@ int conf_read_simple(const char *name, i
 	if (name) {
 		in = zconf_fopen(name);
 	} else {
-		const char **names = conf_confnames;
-		name = *names++;
-		if (!name)
-			return 1;
+		struct property *prop;
+
+		name = conf_def_filename;
 		in = zconf_fopen(name);
 		if (in)
 			goto load;
 		sym_change_count++;
-		while ((name = *names++)) {
-			name = conf_expand_value(name);
+		if (!sym_defconfig_list)
+			return 1;
+
+		for_all_defaults(sym_defconfig_list, prop) {
+			if (expr_calc_value(prop->visible.expr) == no ||
+			    prop->expr->type != E_SYMBOL)
+				continue;
+			name = conf_expand_value(prop->expr->left.sym->name);
 			in = zconf_fopen(name);
 			if (in) {
 				printf(_("#\n"
diff -puN scripts/kconfig/expr.h~kconfig-add-defconfig_list-module-option scripts/kconfig/expr.h
--- devel/scripts/kconfig/expr.h~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/expr.h	2006-04-09 23:44:45.000000000 -0700
@@ -156,6 +156,7 @@ struct file *lookup_file(const char *nam
 
 extern struct symbol symbol_yes, symbol_no, symbol_mod;
 extern struct symbol *modules_sym;
+extern struct symbol *sym_defconfig_list;
 extern int cdebug;
 struct expr *expr_alloc_symbol(struct symbol *sym);
 struct expr *expr_alloc_one(enum expr_type type, struct expr *ce);
diff -puN scripts/kconfig/lkc.h~kconfig-add-defconfig_list-module-option scripts/kconfig/lkc.h
--- devel/scripts/kconfig/lkc.h~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/lkc.h	2006-04-09 23:44:45.000000000 -0700
@@ -104,6 +104,7 @@ const char *str_get(struct gstr *gs);
 /* symbol.c */
 void sym_init(void);
 void sym_clear_all_valid(void);
+void sym_set_all_changed(void);
 void sym_set_changed(struct symbol *sym);
 struct symbol *sym_check_deps(struct symbol *sym);
 struct property *prop_alloc(enum prop_type type, struct symbol *sym);
diff -puN scripts/kconfig/menu.c~kconfig-add-defconfig_list-module-option scripts/kconfig/menu.c
--- devel/scripts/kconfig/menu.c~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/menu.c	2006-04-09 23:44:45.000000000 -0700
@@ -154,6 +154,20 @@ void menu_add_symbol(enum prop_type type
 
 void menu_add_option(int token, char *arg)
 {
+	struct property *prop;
+
+	switch (token) {
+	case T_OPT_MODULES:
+		prop = prop_alloc(P_DEFAULT, modules_sym);
+		prop->expr = expr_alloc_symbol(current_entry->sym);
+		break;
+	case T_OPT_DEFCONFIG_LIST:
+		if (!sym_defconfig_list)
+			sym_defconfig_list = current_entry->sym;
+		else if (sym_defconfig_list != current_entry->sym)
+			zconf_error("trying to redefine defconfig symbol");
+		break;
+	}
 }
 
 static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2)
diff -puN scripts/kconfig/symbol.c~kconfig-add-defconfig_list-module-option scripts/kconfig/symbol.c
--- devel/scripts/kconfig/symbol.c~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/symbol.c	2006-04-09 23:44:45.000000000 -0700
@@ -31,6 +31,7 @@ struct symbol symbol_yes = {
 };
 
 int sym_change_count;
+struct symbol *sym_defconfig_list;
 struct symbol *modules_sym;
 tristate modules_val;
 
@@ -352,10 +353,13 @@ void sym_calc_value(struct symbol *sym)
 		sym->curr.val = sym_calc_choice(sym);
 	sym_validate_range(sym);
 
-	if (memcmp(&oldval, &sym->curr, sizeof(oldval)))
+	if (memcmp(&oldval, &sym->curr, sizeof(oldval))) {
 		sym_set_changed(sym);
-	if (modules_sym == sym)
-		modules_val = modules_sym->curr.tri;
+		if (modules_sym == sym) {
+			sym_set_all_changed();
+			modules_val = modules_sym->curr.tri;
+		}
+	}
 
 	if (sym_is_choice(sym)) {
 		int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
@@ -449,11 +453,8 @@ bool sym_set_tristate_value(struct symbo
 	}
 
 	sym->def[S_DEF_USER].tri = val;
-	if (oldval != val) {
+	if (oldval != val)
 		sym_clear_all_valid();
-		if (sym == modules_sym)
-			sym_set_all_changed();
-	}
 
 	return true;
 }
diff -puN scripts/kconfig/zconf.tab.c_shipped~kconfig-add-defconfig_list-module-option scripts/kconfig/zconf.tab.c_shipped
--- devel/scripts/kconfig/zconf.tab.c_shipped~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/zconf.tab.c_shipped	2006-04-09 23:44:45.000000000 -0700
@@ -2112,7 +2112,9 @@ void conf_parse(const char *name)
 
 	sym_init();
 	menu_init();
-	modules_sym = sym_lookup("MODULES", 0);
+	modules_sym = sym_lookup(NULL, 0);
+	modules_sym->type = S_BOOLEAN;
+	modules_sym->flags |= SYMBOL_AUTO;
 	rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
 
 #if YYDEBUG
@@ -2122,6 +2124,12 @@ void conf_parse(const char *name)
 	zconfparse();
 	if (zconfnerrs)
 		exit(1);
+	if (!modules_sym->prop) {
+		struct property *prop;
+
+		prop = prop_alloc(P_DEFAULT, modules_sym);
+		prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
+	}
 	menu_finalize(&rootmenu);
 	for_all_symbols(i, sym) {
 		sym_check_deps(sym);
diff -puN scripts/kconfig/zconf.y~kconfig-add-defconfig_list-module-option scripts/kconfig/zconf.y
--- devel/scripts/kconfig/zconf.y~kconfig-add-defconfig_list-module-option	2006-04-09 23:44:45.000000000 -0700
+++ devel-akpm/scripts/kconfig/zconf.y	2006-04-09 23:44:45.000000000 -0700
@@ -481,7 +481,9 @@ void conf_parse(const char *name)
 
 	sym_init();
 	menu_init();
-	modules_sym = sym_lookup("MODULES", 0);
+	modules_sym = sym_lookup(NULL, 0);
+	modules_sym->type = S_BOOLEAN;
+	modules_sym->flags |= SYMBOL_AUTO;
 	rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL);
 
 #if YYDEBUG
@@ -491,6 +493,12 @@ void conf_parse(const char *name)
 	zconfparse();
 	if (zconfnerrs)
 		exit(1);
+	if (!modules_sym->prop) {
+		struct property *prop;
+
+		prop = prop_alloc(P_DEFAULT, modules_sym);
+		prop->expr = expr_alloc_symbol(sym_lookup("MODULES", 0));
+	}
 	menu_finalize(&rootmenu);
 	for_all_symbols(i, sym) {
 		sym_check_deps(sym);
_

Patches currently in -mm which might be from zippel@xxxxxxxxxxxxxx are

git-kbuild.patch
m68k-completely-initialize-hw_regs_t-in-ide_setup_ports.patch
m68k-atyfb_base-compile-fix-for-config_pci=n.patch
m68k-cleanup-unistdh.patch
m68k-remove-some-unused-definitions-in-zorroh.patch
m68k-use-c99-initializer.patch
m68k-print-correct-stack-trace.patch
m68k-restore-amikbd-compatibility-with-24.patch
m68k-extra-delay.patch
m68k-use-proper-defines-for-zone-initialization.patch
m68k-adjust-to-changed-hardirq_mask.patch
m68k-m68k-mac-via2-fixes-and-cleanups.patch
m68k-clean-up-uaccessh.patch
fix-incorrect-sa_onstack-behaviour-for-64-bit-processes.patch
adjust-handle_irr_event-return-type.patch
time-use-clocksource-abstraction-for-ntp-adjustments-optimize-out-some-mults-since-gcc-cant-avoid-them.patch
time-rename-clocksource-functions.patch
fix-rt-mutex-defaults-and-dependencies.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux