* [PATCH 7/19] kconfig: remove SYMBOL_{YES,MOD,NO}
From: Roman Zippel @ 2006-04-09 15:28 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
The SYMBOL_{YES,MOD,NO} are not really used anymore (they were more used
be the cml1 converter), so just remove them.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/expr.c | 3 ++-
scripts/kconfig/expr.h | 5 +----
scripts/kconfig/gconf.c | 6 ------
scripts/kconfig/symbol.c | 6 +++---
4 files changed, 6 insertions(+), 14 deletions(-)
Index: linux-2.6-git/scripts/kconfig/expr.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/expr.c
+++ linux-2.6-git/scripts/kconfig/expr.c
@@ -145,7 +145,8 @@ static void __expr_eliminate_eq(enum exp
return;
}
if (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
- e1->left.sym == e2->left.sym && (e1->left.sym->flags & (SYMBOL_YES|SYMBOL_NO)))
+ e1->left.sym == e2->left.sym &&
+ (e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no))
return;
if (!expr_eq(e1, e2))
return;
Index: linux-2.6-git/scripts/kconfig/expr.h
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/expr.h
+++ linux-2.6-git/scripts/kconfig/expr.h
@@ -78,10 +78,7 @@ struct symbol {
#define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
-#define SYMBOL_YES 0x0001
-#define SYMBOL_MOD 0x0002
-#define SYMBOL_NO 0x0004
-#define SYMBOL_CONST 0x0007
+#define SYMBOL_CONST 0x0001
#define SYMBOL_CHECK 0x0008
#define SYMBOL_CHOICE 0x0010
#define SYMBOL_CHOICEVAL 0x0020
Index: linux-2.6-git/scripts/kconfig/gconf.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/gconf.c
+++ linux-2.6-git/scripts/kconfig/gconf.c
@@ -114,12 +114,6 @@ const char *dbg_print_flags(int val)
bzero(buf, 256);
- if (val & SYMBOL_YES)
- strcat(buf, "yes/");
- if (val & SYMBOL_MOD)
- strcat(buf, "mod/");
- if (val & SYMBOL_NO)
- strcat(buf, "no/");
if (val & SYMBOL_CONST)
strcat(buf, "const/");
if (val & SYMBOL_CHECK)
Index: linux-2.6-git/scripts/kconfig/symbol.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/symbol.c
+++ linux-2.6-git/scripts/kconfig/symbol.c
@@ -15,15 +15,15 @@
struct symbol symbol_yes = {
.name = "y",
.curr = { "y", yes },
- .flags = SYMBOL_YES|SYMBOL_VALID,
+ .flags = SYMBOL_CONST|SYMBOL_VALID,
}, symbol_mod = {
.name = "m",
.curr = { "m", mod },
- .flags = SYMBOL_MOD|SYMBOL_VALID,
+ .flags = SYMBOL_CONST|SYMBOL_VALID,
}, symbol_no = {
.name = "n",
.curr = { "n", no },
- .flags = SYMBOL_NO|SYMBOL_VALID,
+ .flags = SYMBOL_CONST|SYMBOL_VALID,
}, symbol_empty = {
.name = "",
.curr = { "", no },
^ permalink raw reply
* [PATCH 6/19] kconfig: fix .config dependencies
From: Roman Zippel @ 2006-04-09 15:28 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Sam Ravnborg
This fixes one of the worst kbuild warts left - the broken dependencies
used to check and regenerate the .config file. This was done via an
indirect dependency and the .config itself had an empty command, which
can cause make not to reread the changed .config file.
Instead of this we generate now a new file include/config/auto.conf from
.config, which is used for kbuild and has the proper dependencies. It's
also the main make target now for all files generated during this step
(and thus replaces include/linux/autoconf.h).
This also means we can now relax the syntax requirements for the .config
file and we don't have to rewrite it all the time, i.e. silentoldconfig
only writes .config now when it's necessary to keep it in sync with the
Kconfig files and even this can be suppressed by setting the environment
variable KCONFIG_NOSILENTUPDATE, so the update can (and must) be done
manually.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
Makefile | 27 ++----
scripts/Makefile.build | 2
scripts/Makefile.modpost | 2
scripts/kconfig/conf.c | 16 +++
scripts/kconfig/confdata.c | 177 ++++++++++++++++++++++++++++++--------------
scripts/kconfig/lkc_proto.h | 1
scripts/kconfig/util.c | 4
7 files changed, 156 insertions(+), 73 deletions(-)
Index: linux-2.6-git/Makefile
===================================================================
--- linux-2.6-git.orig/Makefile
+++ linux-2.6-git/Makefile
@@ -406,7 +406,7 @@ include $(srctree)/arch/$(ARCH)/Makefile
export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
- $(Q)mkdir -p include/linux
+ $(Q)mkdir -p include/linux include/config
$(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
@@ -423,8 +423,6 @@ PHONY += scripts
scripts: scripts_basic include/config/MARKER
$(Q)$(MAKE) $(build)=$(@)
-scripts_basic: include/linux/autoconf.h
-
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
drivers-y := drivers/ sound/
@@ -438,25 +436,22 @@ ifeq ($(dot-config),1)
# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
--include .kconfig.d
-
-include .config
+-include include/config/auto.conf.cmd
+-include include/config/auto.conf
-# If .config needs to be updated, it will be done via the dependency
-# that autoconf has on .config.
# To avoid any implicit rule to kick in, define an empty command
-.config .kconfig.d: ;
+.config include/config/auto.conf.cmd: ;
-# If .config is newer than include/linux/autoconf.h, someone tinkered
+# If .config is newer than include/config/auto.conf, someone tinkered
# with it and forgot to run make oldconfig.
-# If kconfig.d is missing then we are probarly in a cleaned tree so
+# if auto.conf.cmd is missing then we are probarly in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
-include/linux/autoconf.h: .kconfig.d .config
- $(Q)mkdir -p include/linux
+include/config/auto.conf: .config include/config/auto.conf.cmd
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
+
else
# Dummy target needed, because used as prerequisite
-include/linux/autoconf.h: ;
+include/config/auto.conf: ;
endif
# The all: target is the default when no target is given on the
@@ -781,7 +776,7 @@ PHONY += prepare-all
prepare3: .kernelrelease
ifneq ($(KBUILD_SRC),)
@echo ' Using $(srctree) as source for kernel'
- $(Q)if [ -f $(srctree)/.config ]; then \
+ $(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
echo " $(srctree) is not clean, please run 'make mrproper'";\
echo " in the '$(srctree)' directory.";\
/bin/false; \
@@ -824,7 +819,7 @@ include/asm:
# Split autoconf.h into include/linux/config/*
-include/config/MARKER: scripts/basic/split-include include/linux/autoconf.h
+include/config/MARKER: scripts/basic/split-include include/config/auto.conf
@echo ' SPLIT include/linux/autoconf.h -> include/config/*'
@scripts/basic/split-include include/linux/autoconf.h include/config
@touch $@
Index: linux-2.6-git/scripts/Makefile.build
===================================================================
--- linux-2.6-git.orig/scripts/Makefile.build
+++ linux-2.6-git/scripts/Makefile.build
@@ -8,7 +8,7 @@ PHONY := __build
__build:
# Read .config if it exist, otherwise ignore
--include .config
+-include include/config/auto.conf
include scripts/Kbuild.include
Index: linux-2.6-git/scripts/Makefile.modpost
===================================================================
--- linux-2.6-git.orig/scripts/Makefile.modpost
+++ linux-2.6-git/scripts/Makefile.modpost
@@ -35,7 +35,7 @@
PHONY := _modpost
_modpost: __modpost
-include .config
+include include/config/auto.conf
include scripts/Kbuild.include
include scripts/Makefile.lib
Index: linux-2.6-git/scripts/kconfig/conf.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/conf.c
+++ linux-2.6-git/scripts/kconfig/conf.c
@@ -598,7 +598,15 @@ int main(int ac, char **av)
input_mode = ask_silent;
valid_stdin = 1;
}
- }
+ } else if (sym_change_count) {
+ name = getenv("KCONFIG_NOSILENTUPDATE");
+ if (name && *name) {
+ fprintf(stderr, _("\n*** Kernel configuration requires explicit update.\n\n"));
+ return 1;
+ }
+ } else
+ goto skip_check;
+
do {
conf_cnt = 0;
check_conf(&rootmenu);
@@ -607,5 +615,11 @@ int main(int ac, char **av)
fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
return 1;
}
+skip_check:
+ if (input_mode == ask_silent && conf_write_autoconf()) {
+ fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
+ return 1;
+ }
+
return 0;
}
Index: linux-2.6-git/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/confdata.c
+++ linux-2.6-git/scripts/kconfig/confdata.c
@@ -339,7 +339,7 @@ int conf_read(const char *name)
int conf_write(const char *name)
{
- FILE *out, *out_h;
+ FILE *out;
struct symbol *sym;
struct menu *menu;
const char *basename;
@@ -376,13 +376,6 @@ int conf_write(const char *name)
out = fopen(newname, "w");
if (!out)
return 1;
- out_h = NULL;
- if (!name) {
- out_h = fopen(".tmpconfig.h", "w");
- if (!out_h)
- return 1;
- file_write_dep(NULL);
- }
sym = sym_lookup("KERNELVERSION", 0);
sym_calc_value(sym);
time(&now);
@@ -398,16 +391,6 @@ int conf_write(const char *name)
sym_get_string_value(sym),
use_timestamp ? "# " : "",
use_timestamp ? ctime(&now) : "");
- if (out_h)
- fprintf(out_h, "/*\n"
- " * Automatically generated C config: don't edit\n"
- " * Linux kernel version: %s\n"
- "%s%s"
- " */\n"
- "#define AUTOCONF_INCLUDED\n",
- sym_get_string_value(sym),
- use_timestamp ? " * " : "",
- use_timestamp ? ctime(&now) : "");
if (!sym_change_count)
sym_clear_all_valid();
@@ -423,11 +406,6 @@ int conf_write(const char *name)
"#\n"
"# %s\n"
"#\n", str);
- if (out_h)
- fprintf(out_h, "\n"
- "/*\n"
- " * %s\n"
- " */\n", str);
} else if (!(sym->flags & SYMBOL_CHOICE)) {
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE))
@@ -445,59 +423,39 @@ int conf_write(const char *name)
switch (sym_get_tristate_value(sym)) {
case no:
fprintf(out, "# CONFIG_%s is not set\n", sym->name);
- if (out_h)
- fprintf(out_h, "#undef CONFIG_%s\n", sym->name);
break;
case mod:
fprintf(out, "CONFIG_%s=m\n", sym->name);
- if (out_h)
- fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
break;
case yes:
fprintf(out, "CONFIG_%s=y\n", sym->name);
- if (out_h)
- fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
break;
}
break;
case S_STRING:
- // fix me
str = sym_get_string_value(sym);
fprintf(out, "CONFIG_%s=\"", sym->name);
- if (out_h)
- fprintf(out_h, "#define CONFIG_%s \"", sym->name);
- do {
+ while (1) {
l = strcspn(str, "\"\\");
if (l) {
fwrite(str, l, 1, out);
- if (out_h)
- fwrite(str, l, 1, out_h);
- }
- str += l;
- while (*str == '\\' || *str == '"') {
- fprintf(out, "\\%c", *str);
- if (out_h)
- fprintf(out_h, "\\%c", *str);
- str++;
+ str += l;
}
- } while (*str);
+ if (!*str)
+ break;
+ fprintf(out, "\\%c", *str++);
+ }
fputs("\"\n", out);
- if (out_h)
- fputs("\"\n", out_h);
break;
case S_HEX:
str = sym_get_string_value(sym);
if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
- if (out_h)
- fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
break;
}
case S_INT:
str = sym_get_string_value(sym);
fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
- if (out_h)
- fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
break;
}
}
@@ -517,10 +475,6 @@ int conf_write(const char *name)
}
}
fclose(out);
- if (out_h) {
- fclose(out_h);
- rename(".tmpconfig.h", "include/linux/autoconf.h");
- }
if (!name || basename != conf_def_filename) {
if (!name)
name = conf_def_filename;
@@ -539,3 +493,120 @@ int conf_write(const char *name)
return 0;
}
+
+int conf_write_autoconf(void)
+{
+ struct symbol *sym;
+ const char *str;
+ char *name;
+ FILE *out, *out_h;
+ time_t now;
+ int i, l;
+
+ file_write_dep("include/config/auto.conf.cmd");
+
+ out = fopen(".tmpconfig", "w");
+ if (!out)
+ return 1;
+
+ out_h = fopen(".tmpconfig.h", "w");
+ if (!out_h) {
+ fclose(out);
+ return 1;
+ }
+
+ sym = sym_lookup("KERNELVERSION", 0);
+ sym_calc_value(sym);
+ time(&now);
+ fprintf(out, "#\n"
+ "# Automatically generated make config: don't edit\n"
+ "# Linux kernel version: %s\n"
+ "# %s"
+ "#\n",
+ sym_get_string_value(sym), ctime(&now));
+ fprintf(out_h, "/*\n"
+ " * Automatically generated C config: don't edit\n"
+ " * Linux kernel version: %s\n"
+ " * %s"
+ " */\n"
+ "#define AUTOCONF_INCLUDED\n",
+ sym_get_string_value(sym), ctime(&now));
+
+ sym_clear_all_valid();
+
+ for_all_symbols(i, sym) {
+ sym_calc_value(sym);
+ if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
+ continue;
+ switch (sym->type) {
+ case S_BOOLEAN:
+ case S_TRISTATE:
+ switch (sym_get_tristate_value(sym)) {
+ case no:
+ break;
+ case mod:
+ fprintf(out, "CONFIG_%s=m\n", sym->name);
+ fprintf(out_h, "#define CONFIG_%s_MODULE 1\n", sym->name);
+ break;
+ case yes:
+ fprintf(out, "CONFIG_%s=y\n", sym->name);
+ fprintf(out_h, "#define CONFIG_%s 1\n", sym->name);
+ break;
+ }
+ break;
+ case S_STRING:
+ str = sym_get_string_value(sym);
+ fprintf(out, "CONFIG_%s=\"", sym->name);
+ fprintf(out_h, "#define CONFIG_%s \"", sym->name);
+ while (1) {
+ l = strcspn(str, "\"\\");
+ if (l) {
+ fwrite(str, l, 1, out);
+ fwrite(str, l, 1, out_h);
+ str += l;
+ }
+ if (!*str)
+ break;
+ fprintf(out, "\\%c", *str);
+ fprintf(out_h, "\\%c", *str);
+ str++;
+ }
+ fputs("\"\n", out);
+ fputs("\"\n", out_h);
+ break;
+ case S_HEX:
+ str = sym_get_string_value(sym);
+ if (str[0] != '0' || (str[1] != 'x' && str[1] != 'X')) {
+ fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+ fprintf(out_h, "#define CONFIG_%s 0x%s\n", sym->name, str);
+ break;
+ }
+ case S_INT:
+ str = sym_get_string_value(sym);
+ fprintf(out, "CONFIG_%s=%s\n", sym->name, str);
+ fprintf(out_h, "#define CONFIG_%s %s\n", sym->name, str);
+ break;
+ default:
+ break;
+ }
+ }
+ fclose(out);
+ fclose(out_h);
+
+ name = getenv("KCONFIG_AUTOHEADER");
+ if (!name)
+ name = "include/linux/autoconf.h";
+ if (rename(".tmpconfig.h", name))
+ return 1;
+ name = getenv("KCONFIG_AUTOCONFIG");
+ if (!name)
+ name = "include/config/auto.conf";
+ /*
+ * This must be the last step, kbuild has a dependency on auto.conf
+ * and this marks the successful completion of the previous steps.
+ */
+ if (rename(".tmpconfig", name))
+ return 1;
+
+ return 0;
+}
Index: linux-2.6-git/scripts/kconfig/lkc_proto.h
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/lkc_proto.h
+++ linux-2.6-git/scripts/kconfig/lkc_proto.h
@@ -4,6 +4,7 @@ P(conf_parse,void,(const char *name));
P(conf_read,int,(const char *name));
P(conf_read_simple,int,(const char *name));
P(conf_write,int,(const char *name));
+P(conf_write_autoconf,int,(void));
/* menu.c */
P(rootmenu,struct menu,);
Index: linux-2.6-git/scripts/kconfig/util.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/util.c
+++ linux-2.6-git/scripts/kconfig/util.c
@@ -44,7 +44,9 @@ int file_write_dep(const char *name)
else
fprintf(out, "\t%s\n", file->name);
}
- fprintf(out, "\n.config include/linux/autoconf.h: $(deps_config)\n\n$(deps_config):\n");
+ fprintf(out, "\ninclude/config/auto.conf: \\\n"
+ "\t$(deps_config)\n\n"
+ "$(deps_config): ;\n");
fclose(out);
rename("..config.tmp", name);
return 0;
^ permalink raw reply
* [PATCH 5/19] kconfig: improve config load/save output
From: Roman Zippel @ 2006-04-09 15:27 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
During loading special case the first common case (.config), be silent
about it and otherwise mark it as a change that requires saving. Instead
output that the file has been changed.
IOW if conf does nothing (special), it's silent.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/confdata.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
Index: linux-2.6-git/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/confdata.c
+++ linux-2.6-git/scripts/kconfig/confdata.c
@@ -98,20 +98,28 @@ int conf_read_simple(const char *name)
in = zconf_fopen(name);
} else {
const char **names = conf_confnames;
+ name = *names++;
+ if (!name)
+ return 1;
+ in = zconf_fopen(name);
+ if (in)
+ goto load;
+ sym_change_count++;
while ((name = *names++)) {
name = conf_expand_value(name);
in = zconf_fopen(name);
if (in) {
printf(_("#\n"
- "# using defaults found in %s\n"
- "#\n"), name);
- break;
+ "# using defaults found in %s\n"
+ "#\n"), name);
+ goto load;
}
}
}
if (!in)
return 1;
+load:
conf_filename = name;
conf_lineno = 0;
conf_warnings = 0;
@@ -275,6 +283,8 @@ int conf_read(const char *name)
struct expr *e;
int i;
+ sym_change_count = 0;
+
if (conf_read_simple(name))
return 1;
@@ -325,7 +335,7 @@ int conf_read(const char *name)
sym->flags |= e->right.sym->flags & SYMBOL_NEW;
}
- sym_change_count = conf_warnings || conf_unsaved;
+ sym_change_count += conf_warnings || conf_unsaved;
return 0;
}
@@ -524,6 +534,10 @@ int conf_write(const char *name)
if (rename(newname, tmpname))
return 1;
+ printf(_("#\n"
+ "# configuration written to %s\n"
+ "#\n"), tmpname);
+
sym_change_count = 0;
return 0;
^ permalink raw reply
* [PATCH 4/19] kconfig: fix typo in change count initialization
From: Roman Zippel @ 2006-04-09 15:27 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/confdata.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6-git/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/confdata.c
+++ linux-2.6-git/scripts/kconfig/confdata.c
@@ -325,7 +325,7 @@ int conf_read(const char *name)
sym->flags |= e->right.sym->flags & SYMBOL_NEW;
}
- sym_change_count = conf_warnings && conf_unsaved;
+ sym_change_count = conf_warnings || conf_unsaved;
return 0;
}
^ permalink raw reply
* [PATCH 3/19] kconfig: recenter menuconfig
From: Roman Zippel @ 2006-04-09 15:27 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Sam Ravnborg
Move the menuconfig output more into the centre again, it's using a
fixed position depending on the window width using the fact that the
menu output has to work in a 80 chars terminal.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/lxdialog/menubox.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
Index: linux-2.6-git/scripts/kconfig/lxdialog/menubox.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/lxdialog/menubox.c
+++ linux-2.6-git/scripts/kconfig/lxdialog/menubox.c
@@ -58,8 +58,7 @@
#include "dialog.h"
-#define ITEM_IDENT 1 /* Indent of menu entries. Fixed for all menus */
-static int menu_width;
+static int menu_width, item_x;
/*
* Print menu item
@@ -70,7 +69,7 @@ static void do_print_item(WINDOW * win,
int j;
char *menu_item = malloc(menu_width + 1);
- strncpy(menu_item, item, menu_width - ITEM_IDENT);
+ strncpy(menu_item, item, menu_width - item_x);
menu_item[menu_width] = 0;
j = first_alpha(menu_item, "YyNnMmHh");
@@ -87,13 +86,13 @@ static void do_print_item(WINDOW * win,
wclrtoeol(win);
#endif
wattrset(win, selected ? item_selected_attr : item_attr);
- mvwaddstr(win, choice, ITEM_IDENT, menu_item);
+ mvwaddstr(win, choice, item_x, menu_item);
if (hotkey) {
wattrset(win, selected ? tag_key_selected_attr : tag_key_attr);
- mvwaddch(win, choice, ITEM_IDENT + j, menu_item[j]);
+ mvwaddch(win, choice, item_x + j, menu_item[j]);
}
if (selected) {
- wmove(win, choice, ITEM_IDENT + 1);
+ wmove(win, choice, item_x + 1);
}
free(menu_item);
wrefresh(win);
@@ -227,6 +226,8 @@ int dialog_menu(const char *title, const
draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2,
menubox_border_attr, menubox_attr);
+ item_x = (menu_width - 70) / 2;
+
/* Set choice to default item */
for (i = 0; i < item_no; i++)
if (strcmp(current, items[i * 2]) == 0)
@@ -263,10 +264,10 @@ int dialog_menu(const char *title, const
wnoutrefresh(menu);
print_arrows(dialog, item_no, scroll,
- box_y, box_x + ITEM_IDENT + 1, menu_height);
+ box_y, box_x + item_x + 1, menu_height);
print_buttons(dialog, height, width, 0);
- wmove(menu, choice, ITEM_IDENT + 1);
+ wmove(menu, choice, item_x + 1);
wrefresh(menu);
while (key != ESC) {
@@ -349,7 +350,7 @@ int dialog_menu(const char *title, const
print_item(scroll + choice, choice, TRUE);
print_arrows(dialog, item_no, scroll,
- box_y, box_x + ITEM_IDENT + 1, menu_height);
+ box_y, box_x + item_x + 1, menu_height);
wnoutrefresh(dialog);
wrefresh(menu);
^ permalink raw reply
* [PATCH 2/19] kconfig: revert conf behaviour change
From: Roman Zippel @ 2006-04-09 15:26 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
After the last patch fixed the real problem, revert this needless behaviour
change of conf, which only hid the real problem.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/conf.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
Index: linux-2.6-git/scripts/kconfig/conf.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/conf.c
+++ linux-2.6-git/scripts/kconfig/conf.c
@@ -63,20 +63,6 @@ static void check_stdin(void)
}
}
-static char *fgets_check_stream(char *s, int size, FILE *stream)
-{
- char *ret = fgets(s, size, stream);
-
- if (ret == NULL && feof(stream)) {
- printf(_("aborted!\n\n"));
- printf(_("Console input is closed. "));
- printf(_("Run 'make oldconfig' to update configuration.\n\n"));
- exit(1);
- }
-
- return ret;
-}
-
static void conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
@@ -114,7 +100,7 @@ static void conf_askvalue(struct symbol
check_stdin();
case ask_all:
fflush(stdout);
- fgets_check_stream(line, 128, stdin);
+ fgets(line, 128, stdin);
return;
case set_default:
printf("%s\n", def);
@@ -369,7 +355,7 @@ static int conf_choice(struct menu *menu
check_stdin();
case ask_all:
fflush(stdout);
- fgets_check_stream(line, 128, stdin);
+ fgets(line, 128, stdin);
strip(line);
if (line[0] == '?') {
printf("\n%s\n", menu->sym->help ?
^ permalink raw reply
* [PATCH 1/19] kconfig: fix default value for choice input
From: Roman Zippel @ 2006-04-09 15:26 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
The wrong default value can cause conf to end up in endless loop for choice
questions.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
---
scripts/kconfig/conf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: linux-2.6-git/scripts/kconfig/conf.c
===================================================================
--- linux-2.6-git.orig/scripts/kconfig/conf.c
+++ linux-2.6-git/scripts/kconfig/conf.c
@@ -328,8 +328,7 @@ static int conf_choice(struct menu *menu
printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu));
def_sym = sym_get_choice_value(sym);
cnt = def = 0;
- line[0] = '0';
- line[1] = 0;
+ line[0] = 0;
for (child = menu->list; child; child = child->next) {
if (!menu_is_visible(child))
continue;
^ permalink raw reply
* [PATCH 0/19] kconfig patches
From: Roman Zippel @ 2006-04-09 15:26 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Sam Ravnborg
Hi,
Here is a batch of kconfig (and also some kbuild related) patches. The
first four patches I'd like to see to go into 2.6.17 if possible. Although
I'm quite confident about the remaining patches, a bit more testing can't
hurt.
Some comments about the most interesting aspects from a user perspective
for these patches:
Now it's possible to do something like "vi .config; make" and be
reasonably certain it does the right thing, before especially kbuild
related config changes were not correctly picked up by make and required
an explicit "make oldconfig".
Andrew, what might be very interesting for you is that kconfig is not
rewriting .config anymore all the time by itself and if you set
KCONFIG_NOSILENTUPDATE you can even omit the silent updates, so unless you
explicitly call one of the config targets, you can be sure kbuild won't
touch your .config symlink anymore and as long as the .config is in sync
with the Kconfig files you shouldn't see a difference. I'm very interested
how that works for you.
Another interesting feature are the xconfig changes, it supports now a
search option like menuconfig and the help output links to other symbols,
so one can basically browse through the kconfig info. The latter is still
a bit experimental, so it's only visible if the debug info option is
enabled.
bye, Roman
^ permalink raw reply
* [PATCH ACPI] memory leakages in drivers/acpi/thermal.c
From: Vasily Averin @ 2006-04-09 15:08 UTC (permalink / raw)
To: Len Brown, linux-acpi, Linux Kernel Mailing List, Andrew Morton,
Kirill Korotaev, devel
[-- Attachment #1: Type: text/plain, Size: 228 bytes --]
acpi_thermal_write_trip_points() and acpi_thermal_add() do not call kfree() for
allocated memory on the error path.
Signed-off-by: Vasily Averin <vvs@sw.ru>
Thank you,
Vasily Averin
SWsoft Virtuozzo/OpenVZ Linux kernel team
[-- Attachment #2: diff-ms-acpi-thermal-20060409 --]
[-- Type: text/plain, Size: 720 bytes --]
--- a/drivers/acpi/thermal.c 2006-04-09 17:03:50.000000000 +0400
+++ b/drivers/acpi/thermal.c 2006-04-09 17:46:41.000000000 +0400
@@ -942,8 +942,10 @@ acpi_thermal_write_trip_points(struct fi
memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN);
active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL);
- if (!active)
+ if (!active) {
+ kfree(limit_string);
return_VALUE(-ENOMEM);
+ }
if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
@@ -1342,7 +1344,7 @@ static int acpi_thermal_add(struct acpi_
result = acpi_thermal_add_fs(device);
if (result)
- return_VALUE(result);
+ goto end;
init_timer(&tz->timer);
^ permalink raw reply
* [PATCH ACPI] memory leak in acpi_evaluate_integer()
From: Vasily Averin @ 2006-04-09 15:07 UTC (permalink / raw)
To: Len Brown, linux-acpi, Linux Kernel Mailing List, Andrew Morton,
Kirill Korotaev, devel
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
acpi_evaluate_integer() does not release allocated memory on the error path.
Signed-off-by: Vasily Averin <vvs@sw.ru>
Thank you,
Vasily Averin
SWsoft Virtuozzo/OpenVZ Linux kernel team
[-- Attachment #2: diff-ms-acpi-evint-20060409 --]
[-- Type: text/plain, Size: 558 bytes --]
--- a/drivers/acpi/utils.c 2006-04-09 14:31:39.000000000 +0400
+++ b/drivers/acpi/utils.c 2006-04-09 14:35:02.000000000 +0400
@@ -273,11 +273,13 @@ acpi_evaluate_integer(acpi_handle handle
status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
if (ACPI_FAILURE(status)) {
acpi_util_eval_error(handle, pathname, status);
+ kfree(element);
return_ACPI_STATUS(status);
}
if (element->type != ACPI_TYPE_INTEGER) {
acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
+ kfree(element);
return_ACPI_STATUS(AE_BAD_DATA);
}
^ permalink raw reply
* Re: Black box flight recorder for Linux
From: Andi Kleen @ 2006-04-09 15:04 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: Robert Hancock, linux-kernel
In-Reply-To: <4437E4B7.40208@superbug.co.uk>
On Saturday 08 April 2006 18:28, James Courtier-Dutton wrote:
> Andi Kleen wrote:
> > On Saturday 08 April 2006 16:05, Robert Hancock wrote:
> >> Andi Kleen wrote:
> >>> James Courtier-Dutton <James@superbug.co.uk> writes:
> >>>> Now, the question I have is, if I write values to RAM, do any of those
> >>>> values survive a reset?
> >>> They don't generally.
> >>>
> >>> Some people used to write the oopses into video memory, but that
> >>> is not portable.
> >> I wouldn't think most BIOSes these days would bother to clear system RAM
> >> on a reboot. Certainly Microsoft was encouraging vendors not to do this
> >> because it slowed down system boot time.to
> >
> > Reset button is like a cold boot and it generally ends up with cleared
> > RAM.
> >
> > -Andi
>
> Thank you. That saved me 30mins hacking. :-)
Sorry for having discouraged you.
Actually there is a rare special case - triple fault - where you
might be ok if the BIOS correctly supports the ACPI "bootflag" standard,
but triple faults are relatively rare. They happen when the
kernel screws up so badly that the CPU cannot even run exception
handlers anymore. But I suspect it's too special for this.
First if you're not aware of this - the "official" way right now
to solve this problem is kexec + kdump + a preloaded crash kernel. But in
practice it still has many problems because a lot of drivers cannot
reinitialize the hardware properly. And of course it will users need
to load the crash kernel in advance and lose about 64MB of RAM.
My personal solution to the problem is firescope, but it also has its
drawbacks (needs ohci1394 loaded first, requires a firewire cable)
What I would do for this if you want to hack.- define a generic interface that allows
drivers to register memory storage handlers. Add a entry into the oops die
and panic notifiers that saves the kernel log into these backends.
Then write some Documentation file for it and add a proof of comcept e.g. to the
Nvidia/ATI frame buffer drivers. Then driver writers could expose this functionality
if their hardware supports it or if someone has an embedded platform that
guarantees it they could also use it.
For Nvidia/ATI it might be tricky to get the
X server to keep its hands off the memory, but I assume most graphic cards
these days have more memory than the X server uses at least without 3d (?).
If you're unlucky it will fill up everything with mozilla pixmaps over time though.
In the worst case you would need to define a new interface between X server
and kernel to tell the X server to leave some memory alone.
The generic driver could also do the high level work, like adding proper
checksums and magic values to make sure the data is sane after reboot.
You would also need another driver that allows the boot process to read that
data.
Hope this helps,
-Andi
^ permalink raw reply
* Re: [2.6 patch] drivers/isdn/capi/capiutil.c: unexport capi_message2str
From: Arjan van de Ven @ 2006-04-09 15:02 UTC (permalink / raw)
To: Karsten Keil; +Cc: Adrian Bunk, isdn4linux, linux-kernel
In-Reply-To: <20060409130730.GA27948@pingi.kke.suse.de>
On Sun, 2006-04-09 at 15:07 +0200, Karsten Keil wrote:
> On Fri, Apr 07, 2006 at 11:17:36PM +0200, Adrian Bunk wrote:
> > This patch removes an unused EXPORT_SYMBOL.
> >
> > Signed-off-by: Adrian Bunk <bunk@stusta.de>
> >
> > --- linux-2.6.17-rc1-mm1-full/drivers/isdn/capi/capiutil.c.old 2006-04-07 10:47:30.000000000 +0200
> > +++ linux-2.6.17-rc1-mm1-full/drivers/isdn/capi/capiutil.c 2006-04-07 10:47:37.000000000 +0200
> > @@ -855,5 +855,4 @@
> > EXPORT_SYMBOL(capi_cmsg_header);
> > EXPORT_SYMBOL(capi_cmd2str);
> > EXPORT_SYMBOL(capi_cmsg2str);
> > -EXPORT_SYMBOL(capi_message2str);
> > EXPORT_SYMBOL(capi_info2str);
> >
>
> Yes it is currently unused, but part of the CAPI driver SDK for supporting
> debug messages in capi drivers, so I would tend to let it exported, if here
> are not strong arguments against exporting it.
every export takes space in the binary kernel. There's some 900 of these
unused ones, totalling to about 100Kb of unused bloat.
^ permalink raw reply
* [-mm patch] drivers/char/drm/drm_memory.c: possible cleanups
From: Adrian Bunk @ 2006-04-09 14:58 UTC (permalink / raw)
To: Andrew Morton, airlied; +Cc: linux-kernel, dri-devel
In-Reply-To: <20060408031405.5e5131da.akpm@osdl.org>
On Sat, Apr 08, 2006 at 03:14:05AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.17-rc1-mm1:
>...
> git-drm.patch
>...
> git trees
>...
This patch contains the following possible cleanups plus the changes
caused by them:
- #if 0 the following unused global function:
- drm_ioremap_nocache()
- make the following needlessly global functions static:
- agp_remap()
- drm_lookup_map()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
drivers/char/drm/drmP.h | 4 ++--
drivers/char/drm/drm_memory.c | 25 +++++++++++++++++++++----
drivers/char/drm/drm_memory.h | 24 ------------------------
drivers/char/drm/drm_memory_debug.h | 2 ++
4 files changed, 25 insertions(+), 30 deletions(-)
--- linux-2.6.17-rc1-mm2-full/drivers/char/drm/drmP.h.old 2006-04-09 16:18:20.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/char/drm/drmP.h 2006-04-09 16:18:38.000000000 +0200
@@ -815,8 +815,6 @@
extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area);
extern void *drm_ioremap(unsigned long offset, unsigned long size,
drm_device_t * dev);
-extern void *drm_ioremap_nocache(unsigned long offset, unsigned long size,
- drm_device_t * dev);
extern void drm_ioremapfree(void *pt, unsigned long size, drm_device_t * dev);
extern DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type);
@@ -1022,11 +1020,13 @@
map->handle = drm_ioremap(map->offset, map->size, dev);
}
+#if 0
static __inline__ void drm_core_ioremap_nocache(struct drm_map *map,
struct drm_device *dev)
{
map->handle = drm_ioremap_nocache(map->offset, map->size, dev);
}
+#endif /* 0 */
static __inline__ void drm_core_ioremapfree(struct drm_map *map,
struct drm_device *dev)
--- linux-2.6.17-rc1-mm2-full/drivers/char/drm/drm_memory.h.old 2006-04-09 16:15:53.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/char/drm/drm_memory.h 2006-04-09 16:21:28.000000000 +0200
@@ -57,15 +57,6 @@
# endif
#endif
-/*
- * Find the drm_map that covers the range [offset, offset+size).
- */
-drm_map_t *drm_lookup_map(unsigned long offset,
- unsigned long size, drm_device_t * dev);
-
-void *agp_remap(unsigned long offset, unsigned long size,
- drm_device_t * dev);
-
static inline unsigned long drm_follow_page(void *vaddr)
{
pgd_t *pgd = pgd_offset_k((unsigned long)vaddr);
@@ -77,18 +68,6 @@
#else /* __OS_HAS_AGP */
-static inline drm_map_t *drm_lookup_map(unsigned long offset,
- unsigned long size, drm_device_t * dev)
-{
- return NULL;
-}
-
-static inline void *agp_remap(unsigned long offset, unsigned long size,
- drm_device_t * dev)
-{
- return NULL;
-}
-
static inline unsigned long drm_follow_page(void *vaddr)
{
return 0;
@@ -99,8 +78,5 @@
void *drm_ioremap(unsigned long offset, unsigned long size,
drm_device_t * dev);
-void *drm_ioremap_nocache(unsigned long offset,
- unsigned long size, drm_device_t * dev);
-
void drm_ioremapfree(void *pt, unsigned long size,
drm_device_t * dev);
--- linux-2.6.17-rc1-mm2-full/drivers/char/drm/drm_memory_debug.h.old 2006-04-09 16:19:31.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/char/drm/drm_memory_debug.h 2006-04-09 16:19:44.000000000 +0200
@@ -229,6 +229,7 @@
return pt;
}
+#if 0
void *drm_ioremap_nocache (unsigned long offset, unsigned long size,
drm_device_t * dev) {
void *pt;
@@ -251,6 +252,7 @@
spin_unlock(&drm_mem_lock);
return pt;
}
+#endif /* 0 */
void drm_ioremapfree (void *pt, unsigned long size, drm_device_t * dev) {
int alloc_count;
--- linux-2.6.17-rc1-mm2-full/drivers/char/drm/drm_memory.c.old 2006-04-09 16:16:14.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/char/drm/drm_memory.c 2006-04-09 16:21:24.000000000 +0200
@@ -83,8 +83,8 @@
/*
* Find the drm_map that covers the range [offset, offset+size).
*/
-drm_map_t *drm_lookup_map(unsigned long offset,
- unsigned long size, drm_device_t * dev)
+static drm_map_t *drm_lookup_map(unsigned long offset,
+ unsigned long size, drm_device_t * dev)
{
struct list_head *list;
drm_map_list_t *r_list;
@@ -102,8 +102,8 @@
return NULL;
}
-void *agp_remap(unsigned long offset, unsigned long size,
- drm_device_t * dev)
+static void *agp_remap(unsigned long offset, unsigned long size,
+ drm_device_t * dev)
{
unsigned long *phys_addr_map, i, num_pages =
PAGE_ALIGN(size) / PAGE_SIZE;
@@ -168,6 +168,21 @@
{
return drm_agp_unbind_memory(handle);
}
+
+#else /* __OS_HAS_AGP */
+
+static inline drm_map_t *drm_lookup_map(unsigned long offset,
+ unsigned long size, drm_device_t * dev)
+{
+ return NULL;
+}
+
+static inline void *agp_remap(unsigned long offset, unsigned long size,
+ drm_device_t * dev)
+{
+ return NULL;
+}
+
#endif /* agp */
void *drm_ioremap(unsigned long offset, unsigned long size,
@@ -183,6 +198,7 @@
}
EXPORT_SYMBOL(drm_ioremap);
+#if 0
void *drm_ioremap_nocache(unsigned long offset,
unsigned long size, drm_device_t * dev)
{
@@ -194,6 +210,7 @@
}
return ioremap_nocache(offset, size);
}
+#endif /* 0 */
void drm_ioremapfree(void *pt, unsigned long size,
drm_device_t * dev)
^ permalink raw reply
* [-mm patch] drivers/pci/hotplug/acpiphp_glue.c: make a function static
From: Adrian Bunk @ 2006-04-09 14:50 UTC (permalink / raw)
To: Andrew Morton, MUNEDA Takahiro, Greg Kroah-Hartman
Cc: linux-kernel, linux-pci
In-Reply-To: <20060408031405.5e5131da.akpm@osdl.org>
On Sat, Apr 08, 2006 at 03:14:05AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.17-rc1-mm1:
>...
> +gregkh-pci-acpiphp-configure-_prt-v3.patch
>...
> PCI tree updates
>...
This patch makes the needlessly global acpiphp_bus_trim() static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.17-rc1-mm2-full/drivers/pci/hotplug/acpiphp_glue.c.old 2006-04-09 16:13:00.000000000 +0200
+++ linux-2.6.17-rc1-mm2-full/drivers/pci/hotplug/acpiphp_glue.c 2006-04-09 16:13:13.000000000 +0200
@@ -928,7 +928,7 @@
* @handle: handle to acpi namespace
*
*/
-int acpiphp_bus_trim(acpi_handle handle)
+static int acpiphp_bus_trim(acpi_handle handle)
{
struct acpi_device *device;
int retval;
^ permalink raw reply
* Re: Linux 2.6.17-rc1: /sbin/iptables does not find kernel netfilter
From: Ville Herva @ 2006-04-09 14:45 UTC (permalink / raw)
To: Patrick McHardy; +Cc: linux-kernel, netfilter, davem
In-Reply-To: <20060409144416.GO1686@vianova.fi>
On Sun, Apr 09, 2006 at 05:44:16PM +0300, you [Ville Herva] wrote:
> I just realized
> # CONFIG_NETFILTER_XT_MATCH_STATE is not set
> should probably be set. I'm building a new kernel now...
Ok, that seems to do it.
Thanks for the help, and sorry for the noise. I hope not too many people hit
the same glitch while upgrading...
-- v --
v@iki.fi
^ permalink raw reply
* Re: Linux 2.6.17-rc1: /sbin/iptables does not find kernel netfilter
From: Ville Herva @ 2006-04-09 14:44 UTC (permalink / raw)
To: Patrick McHardy; +Cc: linux-kernel, netfilter, davem
In-Reply-To: <20060409074313.GZ15954@vianova.fi>
On Sun, Apr 09, 2006 at 10:43:13AM +0300, you [Ville Herva] wrote:
> >
> > Most likely you didn't enable the new xtables options. Please post your
> > full config.
>
> The full .config is here
> http://www.iki.fi/v/tmp/2.6.17-rc1.config
Now "iptables -L" works, but I still get
> iptables -A INPUT -p tcp -d 0.0.0.0/0 --dport http -m state --state NEW,ESTABLISHED -j ACCEPT
iptables: Unknown error 4294967295
from about half of the iptables rules.
My current config is here:
http://www.iki.fi/v/tmp/2.6.17-rc1.config.new
The following modules are loaded:
iptable_nat 6948 1
ip_nat 14860 1 iptable_nat
ip_conntrack 43188 2 iptable_nat,ip_nat
ipt_REJECT 4704 0
iptable_filter 2784 0
and
CONFIG_NETFILTER=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_IP_NF_IPTABLES=y
are compiled in statically.
I just realized
# CONFIG_NETFILTER_XT_MATCH_STATE is not set
should probably be set. I'm building a new kernel now...
-- v --
v@iki.fi
^ permalink raw reply
* Re: [PATCH] Unaligned accesses in the ethernet bridge
From: Adrian Bunk @ 2006-04-09 14:26 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Peter Chubb, linux-kernel, netdev
In-Reply-To: <20060407165711.1df5b52e@dxpl.pdx.osdl.net>
On Fri, Apr 07, 2006 at 04:57:11PM -0700, Stephen Hemminger wrote:
> On Thu, 6 Apr 2006 22:37:08 +0200
> Adrian Bunk <bunk@stusta.de> wrote:
>
> > On Thu, Mar 23, 2006 at 01:06:02PM +1100, Peter Chubb wrote:
> > >
> > > I see lots of
> > > kernel unaligned access to 0xa0000001009dbb6f, ip=0xa000000100811591
> > > kernel unaligned access to 0xa0000001009dbb6b, ip=0xa0000001008115c1
> > > kernel unaligned access to 0xa0000001009dbb6d, ip=0xa0000001008115f1
> > > messages in my logs on IA64 when using the ethernet bridge with 2.6.16.
> > >
> > >
> > > Appended is a patch to fix them.
> >
> >
> > I see this patch already made it into 2.6.17-rc1.
> >
> > It seems to be a candidate for 2.6.16.3, too?
> > If yes, please submit it to stable@kernel.org.
>
> The code that caused this was new in 2.6.17
Ah sorry, Peter's "when using the ethernet bridge with 2.6.16" confused
me.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply
* [patch] support HP Compaq Presario B2800 laptop with AD1986A codec
From: Coywolf Qi Hunt @ 2006-04-09 14:22 UTC (permalink / raw)
To: tiwai; +Cc: linux-kernel, alsa-devel, akpm
This adds the support for HP Compaq Presario B2800 laptop with AD1986A codec.
Signed-off-by: Coywolf Qi Hunt <qiyong@freeforge.net>
---
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 2bfe37e..921118f 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -801,6 +801,8 @@ static struct hda_board_config ad1986a_c
.config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */
{ .pci_subvendor = 0x1043, .pci_subdevice = 0x1213,
.config = AD1986A_LAPTOP_EAPD }, /* ASUS A6J */
+ { .pci_subvendor = 0x103c, .pci_subdevice = 0x30af,
+ .config = AD1986A_LAPTOP_EAPD }, /* HP Compaq Presario B2800 */
{}
};
^ permalink raw reply related
* [PATCH] Re: "apm: set display: Interface not engaged" is back on armada laptops [Was: APM Screen Blanking fix]
From: Samuel Thibault @ 2006-04-09 13:57 UTC (permalink / raw)
To: torvalds; +Cc: jordan.crouse, linux-kernel
In-Reply-To: <20060325134625.GA4593@bouh.residence.ens-lyon.fr>
Hi,
Samuel Thibault, le Sat 25 Mar 2006 14:46:25 +0100, a écrit :
> Part of a fix for APM Screen Blanking in
> arch/i386/kernel/apm.c:apm_console_blank() from Jordan Crouse was:
>
> - if (error == APM_NOT_ENGAGED) {
> + if (error == APM_NOT_ENGAGED && state != APM_STATE_READY) {
>
> for "Prevent[ing] the error message from printing out twice."
>
> However, this puts the "apm: set display: Interface not engaged"
> error back on armada laptops (which was the original need for this if
> statement).
Here is a fix:
Fix the "apm: set display: Interface not engaged" error on Armada
laptops again.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index da30a37..df0e174 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -1079,7 +1079,7 @@ static int apm_console_blank(int blank)
break;
}
- if (error == APM_NOT_ENGAGED && state != APM_STATE_READY) {
+ if (error == APM_NOT_ENGAGED) {
static int tried;
int eng_error;
if (tried++ == 0) {
^ permalink raw reply related
* Re: RT task scheduling
From: Ingo Molnar @ 2006-04-09 13:16 UTC (permalink / raw)
To: Darren Hart
Cc: linux-kernel, Thomas Gleixner, Stultz, John, Peter Williams,
Siddha, Suresh B, Nick Piggin
In-Reply-To: <200604052025.05679.darren@dvhart.com>
* Darren Hart <darren@dvhart.com> wrote:
> My last mail specifically addresses preempt-rt, but I'd like to know
> people's thoughts regarding this issue in the mainline kernel. Please
> see my previous post "realtime-preempt scheduling - rt_overload
> behavior" for a testcase that produces unpredictable scheduling
> results.
thanks for the testcase! It indeed triggered a bug in the -rt tree's
"RT-overload" balancing feature. The nature of the bug made it trigger
much less likely on 2-way boxes (where i do most of my -rt testing),
probably that's why it didnt get discovered before. I've uploaded the
-rt14 tree with this bug fixed - does it fix the failures for you?
Ingo
^ permalink raw reply
* Re: [2.6 patch] drivers/isdn/capi/capiutil.c: unexport capi_message2str
From: Karsten Keil @ 2006-04-09 13:07 UTC (permalink / raw)
To: Adrian Bunk; +Cc: isdn4linux, linux-kernel
In-Reply-To: <20060407211736.GO7118@stusta.de>
On Fri, Apr 07, 2006 at 11:17:36PM +0200, Adrian Bunk wrote:
> This patch removes an unused EXPORT_SYMBOL.
>
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> --- linux-2.6.17-rc1-mm1-full/drivers/isdn/capi/capiutil.c.old 2006-04-07 10:47:30.000000000 +0200
> +++ linux-2.6.17-rc1-mm1-full/drivers/isdn/capi/capiutil.c 2006-04-07 10:47:37.000000000 +0200
> @@ -855,5 +855,4 @@
> EXPORT_SYMBOL(capi_cmsg_header);
> EXPORT_SYMBOL(capi_cmd2str);
> EXPORT_SYMBOL(capi_cmsg2str);
> -EXPORT_SYMBOL(capi_message2str);
> EXPORT_SYMBOL(capi_info2str);
>
Yes it is currently unused, but part of the CAPI driver SDK for supporting
debug messages in capi drivers, so I would tend to let it exported, if here
are not strong arguments against exporting it.
--
Karsten Keil
SuSE Labs
ISDN development
^ permalink raw reply
* [PATCH] Staircase cpu scheduler v15 for 2.6.17-rc1*
From: Con Kolivas @ 2006-04-09 12:56 UTC (permalink / raw)
To: linux list, ck list
[-- Attachment #1: Type: text/plain, Size: 1296 bytes --]
Patches for the current staircase cpu scheduler (v15) for 2.6.17-rc1 are here:
http://www.kernel.org/pub/linux/kernel/people/ck/patches/staircase/2.6.17-rc1/2.6.17-rc1-staircase-15.patch
and for mm2 here:
http://www.kernel.org/pub/linux/kernel/people/ck/patches/staircase/2.6.17-rc1/2.6.17-rc1-mm2/2.6.17-rc1-mm2-staircase-15.patch
Martin Bligh was kind enough to put the current version of staircase on
2.6.17-rc1 for testing on http://test.kernel.org/
Performance more or less parallels mainline 2.6.17-rc1 (apart from
interactivity as shown here previously where staircase mostly trumps
mainline).
Jens Axboe was also kind enough to do a kernbench run on 4xIA64 which also
showed no performance difference. See
http://article.gmane.org/gmane.linux.kernel.ck/5472 (the 2nd run is staircase
and the attachments seem to be listed twice by gmane)
Just as a reminder of how much less code than the ever increasing complexity
mainline scheduler staircase is, here is a diffstat of the patch for
2.6.17-rc1-mm2:
fs/proc/array.c | 4
include/linux/sched.h | 20 -
kernel/exit.c | 1
kernel/sched.c | 987
++++++++++++++++----------------------------------
4 files changed, 327 insertions(+), 685 deletions(-)
--
-ck
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
* Re: [patch][rfc] quell interactive feeding frenzy
From: bert hubert @ 2006-04-09 12:14 UTC (permalink / raw)
To: Mike Galbraith
Cc: Con Kolivas, lkml, Ingo Molnar, Andrew Morton, Nick Piggin,
Peter Williams
In-Reply-To: <1144582778.13991.10.camel@homer>
On Sun, Apr 09, 2006 at 01:39:38PM +0200, Mike Galbraith wrote:
> Ok, unusable may be overstated. Nonetheless, that bit of code causes
> serious problems. It makes my little PIII/500 test box trying to fill
> one 100Mbit local network unusable. That is not overstated.
If you try to make a PIII/500 fill 100mbit of TCP/IP using lots of different
processes, that IS a corner load.
I'm sure you can fix this (rare) workload but are you very sure you are not
killing off performance for other situations?
I get flashbacks to the old days of the VM where we had lots patches around
that would all solve (more or less) real problems, but never all at the same
time..
--
http://www.PowerDNS.com Open source, database driven DNS Software
http://netherlabs.nl Open and Closed source services
^ permalink raw reply
* Re: Linux v2.6.16-rc6
From: Andy Furniss @ 2006-04-09 12:08 UTC (permalink / raw)
To: David S. Miller; +Cc: michal.k.k.piotrowski, torvalds, linux-kernel, netdev
In-Reply-To: <20060311.183904.71244086.davem@davemloft.net>
David S. Miller wrote:
> From: "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
> Date: Sun, 12 Mar 2006 02:51:40 +0100
>
>
>>I have noticed this warnings
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/50967 shrinks window
>>148470938:148470943. Repaired.
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/50967 shrinks window
>>148470938:148470943. Repaired.
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/59768 shrinks window
>>1124211698:1124211703. Repaired.
>>TCP: Treason uncloaked! Peer 82.113.55.2:11759/59768 shrinks window
>>1124211698:1124211703. Repaired.
>>
>>It maybe problem with ktorrent.
>
>
> It is a problem with the remote TCP implementation, it is
> illegally advertising a smaller window that it previously
> did.
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Packeteer manipulates window for shaping. I probably misread/read wrong
RFC on this but I thought it didn't break any MUST NOTs.
I assume Linux + SFQ reordering packets during window growth would not
trigger it.
Andy.
^ permalink raw reply
* Slow swapon for big (12GB) swap
From: Grzegorz Kulewski @ 2006-04-09 11:45 UTC (permalink / raw)
To: linux-kernel
Hi,
I am using big swap here (as a backing for potentially huge tmpfs). And I
wonder why swapon on such big (like 12GB) swap takes about 7 minutes
(continuous disk IO). Is this expected? Why it is like that? Can I do
anything to speed it up? Or maybe remove it into the background with low
priority or something like that?
Thanks in advance,
Grzegorz Kulewski
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox