瀏覽代碼

[PATCH] x86: print out early faults via early_printk()

Lost a few hours debugging an early-bootup fault within printk itself,
which manifested itself as a hard to debug early hang.

This patch makes it much easier by printing out early faults via
early_printk(), which function is a lot simpler than a full printk, and
hence more likely to succeed in emergencies.  (We do not recover from early
faults anyway, so there's no loss from not having these messages in the
normal printk buffer.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Ingo Molnar 19 年之前
父節點
當前提交
c0cdf1935c
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/i386/kernel/head.S

+ 4 - 0
arch/i386/kernel/head.S

@@ -398,7 +398,11 @@ ignore_int:
 	pushl 32(%esp)
 	pushl 32(%esp)
 	pushl 40(%esp)
 	pushl 40(%esp)
 	pushl $int_msg
 	pushl $int_msg
+#ifdef CONFIG_EARLY_PRINTK
+	call early_printk
+#else
 	call printk
 	call printk
+#endif
 	addl $(5*4),%esp
 	addl $(5*4),%esp
 	popl %ds
 	popl %ds
 	popl %es
 	popl %es