aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include19
-rw-r--r--scripts/Makefile.headersinst2
-rw-r--r--scripts/kallsyms.c2
-rw-r--r--scripts/kconfig/conf.c2
-rw-r--r--scripts/kconfig/confdata.c37
-rw-r--r--scripts/kconfig/gconf.c35
-rw-r--r--scripts/kconfig/gconf.glade4
-rw-r--r--scripts/kconfig/lkc.h2
-rw-r--r--scripts/kconfig/lkc_proto.h3
-rw-r--r--scripts/kconfig/mconf.c21
-rw-r--r--scripts/kconfig/qconf.cc18
-rw-r--r--scripts/kconfig/qconf.h3
-rw-r--r--scripts/kconfig/symbol.c3
-rw-r--r--scripts/kconfig/zconf.tab.c_shipped2
-rw-r--r--scripts/kconfig/zconf.y2
-rwxr-xr-xscripts/kernel-doc17
-rw-r--r--scripts/mod/modpost.c28
17 files changed, 147 insertions, 53 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 4f5ff19b992b..f01f8c072852 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -56,6 +56,9 @@ endef
56# gcc support functions 56# gcc support functions
57# See documentation in Documentation/kbuild/makefiles.txt 57# See documentation in Documentation/kbuild/makefiles.txt
58 58
59# output directory for tests below
60TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
61
59# as-option 62# as-option
60# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,) 63# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
61 64
@@ -66,9 +69,11 @@ as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
66# as-instr 69# as-instr
67# Usage: cflags-y += $(call as-instr, instr, option1, option2) 70# Usage: cflags-y += $(call as-instr, instr, option1, option2)
68 71
69as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o astest$$$$.out ; \ 72as-instr = $(shell if echo -e "$(1)" | \
70 then echo "$(2)"; else echo "$(3)"; fi; \ 73 $(CC) $(AFLAGS) -c -xassembler - \
71 rm -f astest$$$$.out) 74 -o $(TMPOUT)astest$$$$.out > /dev/null 2>&1; \
75 then rm $(TMPOUT)astest$$$$.out; echo "$(2)"; \
76 else echo "$(3)"; fi)
72 77
73# cc-option 78# cc-option
74# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) 79# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
@@ -97,10 +102,10 @@ cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \
97 102
98# ld-option 103# ld-option
99# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both) 104# Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
100ld-option = $(shell if $(CC) $(1) \ 105ld-option = $(shell if $(CC) $(1) -nostdlib -xc /dev/null \
101 -nostdlib -o ldtest$$$$.out -xc /dev/null \ 106 -o $(TMPOUT)ldtest$$$$.out > /dev/null 2>&1; \
102 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \ 107 then rm $(TMPOUT)ldtest$$$$.out; echo "$(1)"; \
103 rm -f ldtest$$$$.out) 108 else echo "$(2)"; fi)
104 109
105### 110###
106# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= 111# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 4241e0dfeeaf..f7b6705fd6a3 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -109,7 +109,7 @@ quiet_cmd_mkdir = MKDIR $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
109quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@) 109quiet_cmd_gen = GEN $(patsubst $(INSTALL_HDR_PATH)/%,%,$@)
110 cmd_gen = \ 110 cmd_gen = \
111FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \ 111FNAME=$(patsubst $(INSTALL_HDR_PATH)/$(_dst)/%,%,$@) \
112STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z. A-Z_`; \ 112STUBDEF=__ASM_STUB_`echo $$FNAME | tr a-z.- A-Z__`; \
113(echo "/* File autogenerated by 'make headers_install' */" ; \ 113(echo "/* File autogenerated by 'make headers_install' */" ; \
114echo "\#ifndef $$STUBDEF" ; \ 114echo "\#ifndef $$STUBDEF" ; \
115echo "\#define $$STUBDEF" ; \ 115echo "\#define $$STUBDEF" ; \
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index f359b730c2c5..8b809b264d18 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -265,7 +265,7 @@ static void write_src(void)
265 printf("#define ALGN .align 4\n"); 265 printf("#define ALGN .align 4\n");
266 printf("#endif\n"); 266 printf("#endif\n");
267 267
268 printf(".data\n"); 268 printf("\t.section .rodata, \"a\"\n");
269 269
270 /* Provide proper symbols relocatability by their '_text' 270 /* Provide proper symbols relocatability by their '_text'
271 * relativeness. The symbol names cannot be used to construct 271 * relativeness. The symbol names cannot be used to construct
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 4dcb8867b5f4..124b341a18c0 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -600,7 +600,7 @@ int main(int ac, char **av)
600 input_mode = ask_silent; 600 input_mode = ask_silent;
601 valid_stdin = 1; 601 valid_stdin = 1;
602 } 602 }
603 } else if (sym_change_count) { 603 } else if (conf_get_changed()) {
604 name = getenv("KCONFIG_NOSILENTUPDATE"); 604 name = getenv("KCONFIG_NOSILENTUPDATE");
605 if (name && *name) { 605 if (name && *name) {
606 fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n")); 606 fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 66b15ef02931..664fe29dacef 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -100,7 +100,7 @@ int conf_read_simple(const char *name, int def)
100 in = zconf_fopen(name); 100 in = zconf_fopen(name);
101 if (in) 101 if (in)
102 goto load; 102 goto load;
103 sym_change_count++; 103 sym_add_change_count(1);
104 if (!sym_defconfig_list) 104 if (!sym_defconfig_list)
105 return 1; 105 return 1;
106 106
@@ -312,7 +312,7 @@ int conf_read(const char *name)
312 struct expr *e; 312 struct expr *e;
313 int i, flags; 313 int i, flags;
314 314
315 sym_change_count = 0; 315 sym_set_change_count(0);
316 316
317 if (conf_read_simple(name, S_DEF_USER)) 317 if (conf_read_simple(name, S_DEF_USER))
318 return 1; 318 return 1;
@@ -364,7 +364,7 @@ int conf_read(const char *name)
364 sym->flags &= flags | ~SYMBOL_DEF_USER; 364 sym->flags &= flags | ~SYMBOL_DEF_USER;
365 } 365 }
366 366
367 sym_change_count += conf_warnings || conf_unsaved; 367 sym_add_change_count(conf_warnings || conf_unsaved);
368 368
369 return 0; 369 return 0;
370} 370}
@@ -432,7 +432,7 @@ int conf_write(const char *name)
432 use_timestamp ? "# " : "", 432 use_timestamp ? "# " : "",
433 use_timestamp ? ctime(&now) : ""); 433 use_timestamp ? ctime(&now) : "");
434 434
435 if (!sym_change_count) 435 if (!conf_get_changed())
436 sym_clear_all_valid(); 436 sym_clear_all_valid();
437 437
438 menu = rootmenu.list; 438 menu = rootmenu.list;
@@ -528,7 +528,7 @@ int conf_write(const char *name)
528 "# configuration written to %s\n" 528 "# configuration written to %s\n"
529 "#\n"), newname); 529 "#\n"), newname);
530 530
531 sym_change_count = 0; 531 sym_set_change_count(0);
532 532
533 return 0; 533 return 0;
534} 534}
@@ -765,3 +765,30 @@ int conf_write_autoconf(void)
765 765
766 return 0; 766 return 0;
767} 767}
768
769static int sym_change_count;
770static void (*conf_changed_callback)(void);
771
772void sym_set_change_count(int count)
773{
774 int _sym_change_count = sym_change_count;
775 sym_change_count = count;
776 if (conf_changed_callback &&
777 (bool)_sym_change_count != (bool)count)
778 conf_changed_callback();
779}
780
781void sym_add_change_count(int count)
782{
783 sym_set_change_count(count + sym_change_count);
784}
785
786bool conf_get_changed(void)
787{
788 return sym_change_count;
789}
790
791void conf_set_changed_callback(void (*fn)(void))
792{
793 conf_changed_callback = fn;
794}
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 7b0d3a93d5c0..61d8166166ef 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -38,8 +38,6 @@ static gboolean show_all = FALSE;
38static gboolean show_debug = FALSE; 38static gboolean show_debug = FALSE;
39static gboolean resizeable = FALSE; 39static gboolean resizeable = FALSE;
40 40
41static gboolean config_changed = FALSE;
42
43static char nohelp_text[] = 41static char nohelp_text[] =
44 N_("Sorry, no help available for this option yet.\n"); 42 N_("Sorry, no help available for this option yet.\n");
45 43
@@ -50,6 +48,8 @@ GtkWidget *text_w = NULL;
50GtkWidget *hpaned = NULL; 48GtkWidget *hpaned = NULL;
51GtkWidget *vpaned = NULL; 49GtkWidget *vpaned = NULL;
52GtkWidget *back_btn = NULL; 50GtkWidget *back_btn = NULL;
51GtkWidget *save_btn = NULL;
52GtkWidget *save_menu_item = NULL;
53 53
54GtkTextTag *tag1, *tag2; 54GtkTextTag *tag1, *tag2;
55GdkColor color; 55GdkColor color;
@@ -75,7 +75,7 @@ static void display_tree_part(void);
75static void update_tree(struct menu *src, GtkTreeIter * dst); 75static void update_tree(struct menu *src, GtkTreeIter * dst);
76static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row); 76static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row);
77static gchar **fill_row(struct menu *menu); 77static gchar **fill_row(struct menu *menu);
78 78static void conf_changed(void);
79 79
80/* Helping/Debugging Functions */ 80/* Helping/Debugging Functions */
81 81
@@ -224,6 +224,10 @@ void init_main_window(const gchar * glade_file)
224 gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, 224 gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
225 show_value); 225 show_value);
226 226
227 save_btn = glade_xml_get_widget(xml, "button3");
228 save_menu_item = glade_xml_get_widget(xml, "save1");
229 conf_set_changed_callback(conf_changed);
230
227 style = gtk_widget_get_style(main_wnd); 231 style = gtk_widget_get_style(main_wnd);
228 widget = glade_xml_get_widget(xml, "toolbar1"); 232 widget = glade_xml_get_widget(xml, "toolbar1");
229 233
@@ -512,14 +516,14 @@ static void text_insert_msg(const char *title, const char *message)
512 516
513/* Main Windows Callbacks */ 517/* Main Windows Callbacks */
514 518
515void on_save1_activate(GtkMenuItem * menuitem, gpointer user_data); 519void on_save_activate(GtkMenuItem * menuitem, gpointer user_data);
516gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event, 520gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
517 gpointer user_data) 521 gpointer user_data)
518{ 522{
519 GtkWidget *dialog, *label; 523 GtkWidget *dialog, *label;
520 gint result; 524 gint result;
521 525
522 if (config_changed == FALSE) 526 if (!conf_get_changed())
523 return FALSE; 527 return FALSE;
524 528
525 dialog = gtk_dialog_new_with_buttons(_("Warning !"), 529 dialog = gtk_dialog_new_with_buttons(_("Warning !"),
@@ -543,7 +547,7 @@ gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
543 result = gtk_dialog_run(GTK_DIALOG(dialog)); 547 result = gtk_dialog_run(GTK_DIALOG(dialog));
544 switch (result) { 548 switch (result) {
545 case GTK_RESPONSE_YES: 549 case GTK_RESPONSE_YES:
546 on_save1_activate(NULL, NULL); 550 on_save_activate(NULL, NULL);
547 return FALSE; 551 return FALSE;
548 case GTK_RESPONSE_NO: 552 case GTK_RESPONSE_NO:
549 return FALSE; 553 return FALSE;
@@ -621,12 +625,10 @@ void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
621} 625}
622 626
623 627
624void on_save1_activate(GtkMenuItem * menuitem, gpointer user_data) 628void on_save_activate(GtkMenuItem * menuitem, gpointer user_data)
625{ 629{
626 if (conf_write(NULL)) 630 if (conf_write(NULL))
627 text_insert_msg(_("Error"), _("Unable to save configuration !")); 631 text_insert_msg(_("Error"), _("Unable to save configuration !"));
628
629 config_changed = FALSE;
630} 632}
631 633
632 634
@@ -819,12 +821,6 @@ void on_load_clicked(GtkButton * button, gpointer user_data)
819} 821}
820 822
821 823
822void on_save_clicked(GtkButton * button, gpointer user_data)
823{
824 on_save1_activate(NULL, user_data);
825}
826
827
828void on_single_clicked(GtkButton * button, gpointer user_data) 824void on_single_clicked(GtkButton * button, gpointer user_data)
829{ 825{
830 view_mode = SINGLE_VIEW; 826 view_mode = SINGLE_VIEW;
@@ -899,7 +895,6 @@ static void renderer_edited(GtkCellRendererText * cell,
899 895
900 sym_set_string_value(sym, new_def); 896 sym_set_string_value(sym, new_def);
901 897
902 config_changed = TRUE;
903 update_tree(&rootmenu, NULL); 898 update_tree(&rootmenu, NULL);
904 899
905 gtk_tree_path_free(path); 900 gtk_tree_path_free(path);
@@ -930,7 +925,6 @@ static void change_sym_value(struct menu *menu, gint col)
930 if (!sym_tristate_within_range(sym, newval)) 925 if (!sym_tristate_within_range(sym, newval))
931 newval = yes; 926 newval = yes;
932 sym_set_tristate_value(sym, newval); 927 sym_set_tristate_value(sym, newval);
933 config_changed = TRUE;
934 if (view_mode == FULL_VIEW) 928 if (view_mode == FULL_VIEW)
935 update_tree(&rootmenu, NULL); 929 update_tree(&rootmenu, NULL);
936 else if (view_mode == SPLIT_VIEW) { 930 else if (view_mode == SPLIT_VIEW) {
@@ -1633,3 +1627,10 @@ int main(int ac, char *av[])
1633 1627
1634 return 0; 1628 return 0;
1635} 1629}
1630
1631static void conf_changed(void)
1632{
1633 bool changed = conf_get_changed();
1634 gtk_widget_set_sensitive(save_btn, changed);
1635 gtk_widget_set_sensitive(save_menu_item, changed);
1636}
diff --git a/scripts/kconfig/gconf.glade b/scripts/kconfig/gconf.glade
index f8744ed64967..803233fdd6dd 100644
--- a/scripts/kconfig/gconf.glade
+++ b/scripts/kconfig/gconf.glade
@@ -70,7 +70,7 @@
70 <property name="tooltip" translatable="yes">Save the config in .config</property> 70 <property name="tooltip" translatable="yes">Save the config in .config</property>
71 <property name="label" translatable="yes">_Save</property> 71 <property name="label" translatable="yes">_Save</property>
72 <property name="use_underline">True</property> 72 <property name="use_underline">True</property>
73 <signal name="activate" handler="on_save1_activate"/> 73 <signal name="activate" handler="on_save_activate"/>
74 <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/> 74 <accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
75 75
76 <child internal-child="image"> 76 <child internal-child="image">
@@ -380,7 +380,7 @@
380 <property name="visible_horizontal">True</property> 380 <property name="visible_horizontal">True</property>
381 <property name="visible_vertical">True</property> 381 <property name="visible_vertical">True</property>
382 <property name="is_important">False</property> 382 <property name="is_important">False</property>
383 <signal name="clicked" handler="on_save_clicked"/> 383 <signal name="clicked" handler="on_save_activate"/>
384 </widget> 384 </widget>
385 <packing> 385 <packing>
386 <property name="expand">False</property> 386 <property name="expand">False</property>
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 2628023a1fe1..9b2706a41548 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -65,6 +65,8 @@ char *zconf_curname(void);
65 65
66/* confdata.c */ 66/* confdata.c */
67char *conf_get_default_confname(void); 67char *conf_get_default_confname(void);
68void sym_set_change_count(int count);
69void sym_add_change_count(int count);
68 70
69/* kconfig_load.c */ 71/* kconfig_load.c */
70void kconfig_load(void); 72void kconfig_load(void);
diff --git a/scripts/kconfig/lkc_proto.h b/scripts/kconfig/lkc_proto.h
index a263746cfa7d..15030770d1ad 100644
--- a/scripts/kconfig/lkc_proto.h
+++ b/scripts/kconfig/lkc_proto.h
@@ -5,6 +5,8 @@ P(conf_read,int,(const char *name));
5P(conf_read_simple,int,(const char *name, int)); 5P(conf_read_simple,int,(const char *name, int));
6P(conf_write,int,(const char *name)); 6P(conf_write,int,(const char *name));
7P(conf_write_autoconf,int,(void)); 7P(conf_write_autoconf,int,(void));
8P(conf_get_changed,bool,(void));
9P(conf_set_changed_callback, void,(void (*fn)(void)));
8 10
9/* menu.c */ 11/* menu.c */
10P(rootmenu,struct menu,); 12P(rootmenu,struct menu,);
@@ -16,7 +18,6 @@ P(menu_get_parent_menu,struct menu *,(struct menu *menu));
16 18
17/* symbol.c */ 19/* symbol.c */
18P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); 20P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]);
19P(sym_change_count,int,);
20 21
21P(sym_lookup,struct symbol *,(const char *name, int isconst)); 22P(sym_lookup,struct symbol *,(const char *name, int isconst));
22P(sym_find,struct symbol *,(const char *name)); 23P(sym_find,struct symbol *,(const char *name));
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c
index 08a4c7af93ea..3f9a1321b3e6 100644
--- a/scripts/kconfig/mconf.c
+++ b/scripts/kconfig/mconf.c
@@ -890,14 +890,19 @@ int main(int ac, char **av)
890 do { 890 do {
891 conf(&rootmenu); 891 conf(&rootmenu);
892 dialog_clear(); 892 dialog_clear();
893 res = dialog_yesno(NULL, 893 if (conf_get_changed())
894 _("Do you wish to save your " 894 res = dialog_yesno(NULL,
895 "new kernel configuration?\n" 895 _("Do you wish to save your "
896 "<ESC><ESC> to continue."), 896 "new kernel configuration?\n"
897 6, 60); 897 "<ESC><ESC> to continue."),
898 6, 60);
899 else
900 res = -1;
898 } while (res == KEY_ESC); 901 } while (res == KEY_ESC);
899 end_dialog(); 902 end_dialog();
900 if (res == 0) { 903
904 switch (res) {
905 case 0:
901 if (conf_write(NULL)) { 906 if (conf_write(NULL)) {
902 fprintf(stderr, _("\n\n" 907 fprintf(stderr, _("\n\n"
903 "Error during writing of the kernel configuration.\n" 908 "Error during writing of the kernel configuration.\n"
@@ -905,11 +910,13 @@ int main(int ac, char **av)
905 "\n\n")); 910 "\n\n"));
906 return 1; 911 return 1;
907 } 912 }
913 case -1:
908 printf(_("\n\n" 914 printf(_("\n\n"
909 "*** End of Linux kernel configuration.\n" 915 "*** End of Linux kernel configuration.\n"
910 "*** Execute 'make' to build the kernel or try 'make help'." 916 "*** Execute 'make' to build the kernel or try 'make help'."
911 "\n\n")); 917 "\n\n"));
912 } else { 918 break;
919 default:
913 fprintf(stderr, _("\n\n" 920 fprintf(stderr, _("\n\n"
914 "Your kernel configuration changes were NOT saved." 921 "Your kernel configuration changes were NOT saved."
915 "\n\n")); 922 "\n\n"));
diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc
index f5628c57640b..c0ae0a7ddb42 100644
--- a/scripts/kconfig/qconf.cc
+++ b/scripts/kconfig/qconf.cc
@@ -38,6 +38,8 @@
38static QApplication *configApp; 38static QApplication *configApp;
39static ConfigSettings *configSettings; 39static ConfigSettings *configSettings;
40 40
41QAction *ConfigMainWindow::saveAction;
42
41static inline QString qgettext(const char* str) 43static inline QString qgettext(const char* str)
42{ 44{
43 return QString::fromLocal8Bit(gettext(str)); 45 return QString::fromLocal8Bit(gettext(str));
@@ -915,7 +917,7 @@ void ConfigView::updateListAll(void)
915} 917}
916 918
917ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) 919ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name)
918 : Parent(parent, name), menu(0) 920 : Parent(parent, name), menu(0), sym(0)
919{ 921{
920 if (name) { 922 if (name) {
921 configSettings->beginGroup(name); 923 configSettings->beginGroup(name);
@@ -951,6 +953,7 @@ void ConfigInfoView::setInfo(struct menu *m)
951 if (menu == m) 953 if (menu == m)
952 return; 954 return;
953 menu = m; 955 menu = m;
956 sym = NULL;
954 if (!menu) 957 if (!menu)
955 clear(); 958 clear();
956 else 959 else
@@ -1306,8 +1309,11 @@ ConfigMainWindow::ConfigMainWindow(void)
1306 connect(quitAction, SIGNAL(activated()), SLOT(close())); 1309 connect(quitAction, SIGNAL(activated()), SLOT(close()));
1307 QAction *loadAction = new QAction("Load", QPixmap(xpm_load), "&Load", CTRL+Key_L, this); 1310 QAction *loadAction = new QAction("Load", QPixmap(xpm_load), "&Load", CTRL+Key_L, this);
1308 connect(loadAction, SIGNAL(activated()), SLOT(loadConfig())); 1311 connect(loadAction, SIGNAL(activated()), SLOT(loadConfig()));
1309 QAction *saveAction = new QAction("Save", QPixmap(xpm_save), "&Save", CTRL+Key_S, this); 1312 saveAction = new QAction("Save", QPixmap(xpm_save), "&Save", CTRL+Key_S, this);
1310 connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); 1313 connect(saveAction, SIGNAL(activated()), SLOT(saveConfig()));
1314 conf_set_changed_callback(conf_changed);
1315 // Set saveAction's initial state
1316 conf_changed();
1311 QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, this); 1317 QAction *saveAsAction = new QAction("Save As...", "Save &As...", 0, this);
1312 connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); 1318 connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs()));
1313 QAction *searchAction = new QAction("Search", "&Search", CTRL+Key_F, this); 1319 QAction *searchAction = new QAction("Search", "&Search", CTRL+Key_F, this);
@@ -1585,7 +1591,7 @@ void ConfigMainWindow::showFullView(void)
1585 */ 1591 */
1586void ConfigMainWindow::closeEvent(QCloseEvent* e) 1592void ConfigMainWindow::closeEvent(QCloseEvent* e)
1587{ 1593{
1588 if (!sym_change_count) { 1594 if (!conf_get_changed()) {
1589 e->accept(); 1595 e->accept();
1590 return; 1596 return;
1591 } 1597 }
@@ -1658,6 +1664,12 @@ void ConfigMainWindow::saveSettings(void)
1658 configSettings->writeSizes("/split2", split2->sizes()); 1664 configSettings->writeSizes("/split2", split2->sizes());
1659} 1665}
1660 1666
1667void ConfigMainWindow::conf_changed(void)
1668{
1669 if (saveAction)
1670 saveAction->setEnabled(conf_get_changed());
1671}
1672
1661void fixup_rootmenu(struct menu *menu) 1673void fixup_rootmenu(struct menu *menu)
1662{ 1674{
1663 struct menu *child; 1675 struct menu *child;
diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h
index 6a9e3b14c227..6fc1c5f14425 100644
--- a/scripts/kconfig/qconf.h
+++ b/scripts/kconfig/qconf.h
@@ -297,6 +297,9 @@ protected:
297 297
298class ConfigMainWindow : public QMainWindow { 298class ConfigMainWindow : public QMainWindow {
299 Q_OBJECT 299 Q_OBJECT
300
301 static QAction *saveAction;
302 static void conf_changed(void);
300public: 303public:
301 ConfigMainWindow(void); 304 ConfigMainWindow(void);
302public slots: 305public slots:
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index ee225ced2ce4..8f06c474d800 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -30,7 +30,6 @@ struct symbol symbol_yes = {
30 .flags = SYMBOL_VALID, 30 .flags = SYMBOL_VALID,
31}; 31};
32 32
33int sym_change_count;
34struct symbol *sym_defconfig_list; 33struct symbol *sym_defconfig_list;
35struct symbol *modules_sym; 34struct symbol *modules_sym;
36tristate modules_val; 35tristate modules_val;
@@ -379,7 +378,7 @@ void sym_clear_all_valid(void)
379 378
380 for_all_symbols(i, sym) 379 for_all_symbols(i, sym)
381 sym->flags &= ~SYMBOL_VALID; 380 sym->flags &= ~SYMBOL_VALID;
382 sym_change_count++; 381 sym_add_change_count(1);
383 if (modules_sym) 382 if (modules_sym)
384 sym_calc_value(modules_sym); 383 sym_calc_value(modules_sym);
385} 384}
diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped
index 2fb0a4fc61d0..d777fe85627f 100644
--- a/scripts/kconfig/zconf.tab.c_shipped
+++ b/scripts/kconfig/zconf.tab.c_shipped
@@ -2135,7 +2135,7 @@ void conf_parse(const char *name)
2135 sym_check_deps(sym); 2135 sym_check_deps(sym);
2136 } 2136 }
2137 2137
2138 sym_change_count = 1; 2138 sym_set_change_count(1);
2139} 2139}
2140 2140
2141const char *zconf_tokenname(int token) 2141const char *zconf_tokenname(int token)
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index ab44feb3c600..04a5864c03b1 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -504,7 +504,7 @@ void conf_parse(const char *name)
504 sym_check_deps(sym); 504 sym_check_deps(sym);
505 } 505 }
506 506
507 sym_change_count = 1; 507 sym_set_change_count(1);
508} 508}
509 509
510const char *zconf_tokenname(int token) 510const char *zconf_tokenname(int token)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index df3b272f7ce6..f50a70f550b3 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1469,6 +1469,7 @@ sub push_parameter($$$) {
1469 my $param = shift; 1469 my $param = shift;
1470 my $type = shift; 1470 my $type = shift;
1471 my $file = shift; 1471 my $file = shift;
1472 my $anon = 0;
1472 1473
1473 my $param_name = $param; 1474 my $param_name = $param;
1474 $param_name =~ s/\[.*//; 1475 $param_name =~ s/\[.*//;
@@ -1484,9 +1485,20 @@ sub push_parameter($$$) {
1484 $param="void"; 1485 $param="void";
1485 $parameterdescs{void} = "no arguments"; 1486 $parameterdescs{void} = "no arguments";
1486 } 1487 }
1488 elsif ($type eq "" && ($param eq "struct" or $param eq "union"))
1489 # handle unnamed (anonymous) union or struct:
1490 {
1491 $type = $param;
1492 $param = "{unnamed_" . $param. "}";
1493 $parameterdescs{$param} = "anonymous\n";
1494 $anon = 1;
1495 }
1496
1487 # warn if parameter has no description 1497 # warn if parameter has no description
1488 # (but ignore ones starting with # as these are no parameters 1498 # (but ignore ones starting with # as these are not parameters
1489 # but inline preprocessor statements 1499 # but inline preprocessor statements);
1500 # also ignore unnamed structs/unions;
1501 if (!$anon) {
1490 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) { 1502 if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) {
1491 1503
1492 $parameterdescs{$param_name} = $undescribed; 1504 $parameterdescs{$param_name} = $undescribed;
@@ -1500,6 +1512,7 @@ sub push_parameter($$$) {
1500 " No description found for parameter '$param'\n"; 1512 " No description found for parameter '$param'\n";
1501 ++$warnings; 1513 ++$warnings;
1502 } 1514 }
1515 }
1503 1516
1504 push @parameterlist, $param; 1517 push @parameterlist, $param;
1505 $parametertypes{$param} = $type; 1518 $parametertypes{$param} = $type;
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index e26381e3fc00..47bef62eecd7 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -582,9 +582,19 @@ static int strrcmp(const char *s, const char *sub)
582 * tosec = .init.text | .exit.text | .init.data 582 * tosec = .init.text | .exit.text | .init.data
583 * fromsec = .data 583 * fromsec = .data
584 * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one 584 * atsym = *driver, *_template, *_sht, *_ops, *_probe, *probe_one
585 *
586 * Pattern 3:
587 * Some symbols belong to init section but still it is ok to reference
588 * these from non-init sections as these symbols don't have any memory
589 * allocated for them and symbol address and value are same. So even
590 * if init section is freed, its ok to reference those symbols.
591 * For ex. symbols marking the init section boundaries.
592 * This pattern is identified by
593 * refsymname = __init_begin, _sinittext, _einittext
585 **/ 594 **/
586static int secref_whitelist(const char *modname, const char *tosec, 595static int secref_whitelist(const char *modname, const char *tosec,
587 const char *fromsec, const char *atsym) 596 const char *fromsec, const char *atsym,
597 const char *refsymname)
588{ 598{
589 int f1 = 1, f2 = 1; 599 int f1 = 1, f2 = 1;
590 const char **s; 600 const char **s;
@@ -595,6 +605,14 @@ static int secref_whitelist(const char *modname, const char *tosec,
595 "_ops", 605 "_ops",
596 "_probe", 606 "_probe",
597 "_probe_one", 607 "_probe_one",
608 "_console",
609 NULL
610 };
611
612 const char *pat3refsym[] = {
613 "__init_begin",
614 "_sinittext",
615 "_einittext",
598 NULL 616 NULL
599 }; 617 };
600 618
@@ -628,6 +646,11 @@ static int secref_whitelist(const char *modname, const char *tosec,
628 if ((strcmp(fromsec, ".pci_fixup") == 0) && 646 if ((strcmp(fromsec, ".pci_fixup") == 0) &&
629 (strcmp(tosec, ".init.text") == 0)) 647 (strcmp(tosec, ".init.text") == 0))
630 return 1; 648 return 1;
649
650 /* Check for pattern 3 */
651 for (s = pat3refsym; *s; s++)
652 if (strcmp(refsymname, *s) == 0)
653 return 1;
631 } 654 }
632 return 0; 655 return 0;
633} 656}
@@ -737,7 +760,7 @@ static void warn_sec_mismatch(const char *modname, const char *fromsec,
737 /* check whitelist - we may ignore it */ 760 /* check whitelist - we may ignore it */
738 if (before && 761 if (before &&
739 secref_whitelist(modname, secname, fromsec, 762 secref_whitelist(modname, secname, fromsec,
740 elf->strtab + before->st_name)) 763 elf->strtab + before->st_name, refsymname))
741 return; 764 return;
742 765
743 if (before && after) { 766 if (before && after) {
@@ -998,6 +1021,7 @@ static int exit_section_ref_ok(const char *name)
998 "__bug_table", /* used by powerpc for BUG() */ 1021 "__bug_table", /* used by powerpc for BUG() */
999 ".exitcall.exit", 1022 ".exitcall.exit",
1000 ".eh_frame", 1023 ".eh_frame",
1024 ".parainstructions",
1001 ".stab", 1025 ".stab",
1002 "__ex_table", 1026 "__ex_table",
1003 ".fixup", 1027 ".fixup",