aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/setup.c
diff options
context:
space:
mode:
authorStas Sergeev <stsp@aknet.ru>2006-03-23 05:59:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:05 -0500
commit99b7de33477882b86d54ce8ecbf90147f9d106d7 (patch)
tree1409719376eff18346aa6f15ad9d2f698d61302e /arch/i386/kernel/setup.c
parent8bed51cd17464433a0c77afc8a5150e51d3da37d (diff)
[PATCH] x86: early printk handling fixes
The history is that -mm kernels do not work for me for a few months already. The things started from crashing somewhere after starting init, and for the last month - no boot at all, just "Uncompressing... OK, booting kernel", and silence. Early console didn't work too. With the latest releases this degraded into an infinite stream of the "Unknown interrupt or fault" messages. So today my patience ran out and I started to think how can I collect at least some info for the bug-report. Attached is the patch that allows to gather some valueable debug info on the problem by making an early console more useable. I can't properly test the patch, as the kernel still doesn't boot, so I'll explain it in details in a hope someone else can justify the intrusive changes. arch_hooks.h: added prototypes for setup_early_printk() and early_printk(). setup.c: killed wrong setup_early_printk() prototype. Moved setup_early_printk() a bit earlier, as it was not "early enough" to cover the bug I was fighting with. early_printk.c: made it to start printing from the bottom of the screen, otherwise the messages interfere with the ones of the boot-loader, so you can't read them. Signed-off-by: Stas Sergeev <stsp@aknet.ru> Cc: Andi Kleen <ak@muc.de> Cc: Zwane Mwaikambo <zwane@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/setup.c')
-rw-r--r--arch/i386/kernel/setup.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 5f58f8cb9836..2d8782960f41 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1459,6 +1459,16 @@ void __init setup_arch(char **cmdline_p)
1459 1459
1460 parse_cmdline_early(cmdline_p); 1460 parse_cmdline_early(cmdline_p);
1461 1461
1462#ifdef CONFIG_EARLY_PRINTK
1463 {
1464 char *s = strstr(*cmdline_p, "earlyprintk=");
1465 if (s) {
1466 setup_early_printk(strchr(s, '=') + 1);
1467 printk("early console enabled\n");
1468 }
1469 }
1470#endif
1471
1462 max_low_pfn = setup_memory(); 1472 max_low_pfn = setup_memory();
1463 1473
1464 /* 1474 /*
@@ -1483,19 +1493,6 @@ void __init setup_arch(char **cmdline_p)
1483 * NOTE: at this point the bootmem allocator is fully available. 1493 * NOTE: at this point the bootmem allocator is fully available.
1484 */ 1494 */
1485 1495
1486#ifdef CONFIG_EARLY_PRINTK
1487 {
1488 char *s = strstr(*cmdline_p, "earlyprintk=");
1489 if (s) {
1490 extern void setup_early_printk(char *);
1491
1492 setup_early_printk(strchr(s, '=') + 1);
1493 printk("early console enabled\n");
1494 }
1495 }
1496#endif
1497
1498
1499 dmi_scan_machine(); 1496 dmi_scan_machine();
1500 1497
1501#ifdef CONFIG_X86_GENERICARCH 1498#ifdef CONFIG_X86_GENERICARCH