linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86, reboot: skip reboot_fixups in early boot phase
@ 2012-12-28 13:50 Joonsoo Kim
  2013-01-24 17:45 ` Bjorn Helgaas
  0 siblings, 1 reply; 8+ messages in thread
From: Joonsoo Kim @ 2012-12-28 13:50 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: linux-kernel, x86, Joonsoo Kim, Thomas Gleixner, Ingo Molnar

During early boot phase, PCI bus subsystem is not yet initialized.
If panic is occured in early boot phase and panic_timeout is set,
code flow go into emergency_restart() and hit mach_reboot_fixups(), then
encounter another panic. When second panic, we can't hold a panic_lock, so
code flow go into panic_smp_self_stop() which prevent system to restart.

For avoid second panic, skip reboot_fixups in early boot phase.
It makes panic_timeout works in early boot phase.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Joonsoo Kim <js1304@gmail.com>

diff --git a/arch/x86/kernel/reboot_fixups_32.c b/arch/x86/kernel/reboot_fixups_32.c
index c8e41e9..b9b8ec9 100644
--- a/arch/x86/kernel/reboot_fixups_32.c
+++ b/arch/x86/kernel/reboot_fixups_32.c
@@ -89,6 +89,10 @@ void mach_reboot_fixups(void)
 	if (in_interrupt())
 		return;
 
+	/* During early boot phase, PCI is not yet initialized */
+	if (system_state == SYSTEM_BOOTING)
+		return;
+
 	for (i=0; i < ARRAY_SIZE(fixups_table); i++) {
 		cur = &(fixups_table[i]);
 		dev = pci_get_device(cur->vendor, cur->device, NULL);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-29  6:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 13:50 [PATCH] x86, reboot: skip reboot_fixups in early boot phase Joonsoo Kim
2013-01-24 17:45 ` Bjorn Helgaas
2013-01-25  1:13   ` Joonsoo Kim
2013-01-25  2:59     ` Bjorn Helgaas
2013-01-25  4:14       ` Greg Kroah-Hartman
2013-01-25  4:21         ` Bjorn Helgaas
2013-01-25  4:52           ` Greg Kroah-Hartman
2013-01-29  6:03             ` Joonsoo Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).