linux/arch/i386/kernel
Ingo Molnar 5d0e600d90 [PATCH] x86: fix laptop bootup hang in init_acpi()
During kernel bootup, a new T60 laptop (CoreDuo, 32-bit) hangs about
10%-20% of the time in acpi_init():

 Calling initcall 0xc055ce1a: topology_init+0x0/0x2f()
 Calling initcall 0xc055d75e: mtrr_init_finialize+0x0/0x2c()
 Calling initcall 0xc05664f3: param_sysfs_init+0x0/0x175()
 Calling initcall 0xc014cb65: pm_sysrq_init+0x0/0x17()
 Calling initcall 0xc0569f99: init_bio+0x0/0xf4()
 Calling initcall 0xc056b865: genhd_device_init+0x0/0x50()
 Calling initcall 0xc056c4bd: fbmem_init+0x0/0x87()
 Calling initcall 0xc056dd74: acpi_init+0x0/0x1ee()

It's a hard hang that not even an NMI could punch through!  Frustratingly,
adding printks or function tracing to the ACPI code made the hangs go away
...

After some time an additional detail emerged: disabling the NMI watchdog
made these occasional hangs go away.

So i spent the better part of today trying to debug this and trying out
various theories when i finally found the likely reason for the hang: if
acpi_ns_initialize_devices() executes an _INI AML method and an NMI
happens to hit that AML execution in the wrong moment, the machine would
hang.  (my theory is that this must be some sort of chipset setup method
doing stores to chipset mmio registers?)

Unfortunately given the characteristics of the hang it was sheer
impossible to figure out which of the numerous AML methods is impacted
by this problem.

As a workaround i wrote an interface to disable chipset-based NMIs while
executing _INI sections - and indeed this fixed the hang.  I did a
boot-loop of 100 separate reboots and none hung - while without the patch
it would hang every 5-10 attempts.  Out of caution i did not touch the
nmi_watchdog=2 case (it's not related to the chipset anyway and didnt
hang).

I implemented this for both x86_64 and i686, tested the i686 laptop both
with nmi_watchdog=1 [which triggered the hangs] and nmi_watchdog=2, and
tested an Athlon64 box with the 64-bit kernel as well. Everything builds
and works with the patch applied.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-02-13 13:26:24 +01:00
..
acpi ACPICA: Allow ACPI id to be u32 instead of u8. 2007-02-02 21:14:31 -05:00
cpu [PATCH] i386: fix size_or_mask and size_and_mask 2007-02-13 13:26:23 +01:00
.gitignore [PATCH] x86: gitignore some autogenerated files for i386 2006-02-14 16:09:35 -08:00
Makefile [PATCH] i386: vMI timer patches 2007-02-13 13:26:21 +01:00
alternative.c [PATCH] paravirt: Patch inline replacements for paravirt intercepts 2006-12-07 02:14:08 +01:00
apic.c [PATCH] i386: add idle notifier 2007-02-13 13:26:22 +01:00
apm.c [PATCH] i386: Convert /proc/apm to seqfile 2007-02-13 13:26:23 +01:00
asm-offsets.c [PATCH] i386: Convert i386 PDA code to use %fs 2007-02-13 13:26:20 +01:00
bootflag.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
cpuid.c [PATCH] i386: use smp_call_function_single() 2007-02-13 13:26:23 +01:00
crash.c [PATCH] Kexec / Kdump: Unify elf note code 2006-12-07 08:39:46 -08:00
crash_dump.c [PATCH] kdump: read previous kernel's memory 2006-01-10 08:01:28 -08:00
doublefault.c [PATCH] i386: cpu_relax() in crash.c and doublefault.c 2006-06-25 10:00:55 -07:00
e820.c [PATCH] i386: romsignature/checksum cleanup 2007-02-13 13:26:22 +01:00
early_printk.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
efi.c [PATCH] EFI x86: pass firmware call parameters on the stack 2007-02-04 10:27:10 -08:00
efi_stub.S [PATCH] x86: remove unused include from efi_stub.S 2006-09-26 08:48:56 -07:00
entry.S [PATCH] i386: vMI timer patches 2007-02-13 13:26:21 +01:00
head.S [PATCH] i386: move startup_32() in text.head section 2007-02-13 13:26:22 +01:00
hpet.c [PATCH] hpet: trivial __iomem annotations 2007-02-09 09:14:07 -08:00
i386_ksyms.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i387.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
i8237.c [PATCH] mmc (mainly): add "or later" clause to licence statement. 2006-10-01 00:39:23 -07:00
i8253.c [PATCH] i386 Time: Avoid PIT SMP lockups 2006-10-17 08:18:42 -07:00
i8259.c [PATCH] paravirt: header and stubs for paravirtualisation 2006-12-07 02:14:07 +01:00
init_task.c [PATCH] nsproxy: move init_nsproxy into kernel/nsproxy.c 2006-10-02 07:57:20 -07:00
io_apic.c [PATCH] i386: vMI backend for paravirt-ops 2007-02-13 13:26:21 +01:00
ioport.c [PATCH] i386: use thread_info flags for debug regs and IO bitmaps 2006-07-09 18:47:12 -07:00
irq.c [PATCH] i386: add idle notifier 2007-02-13 13:26:22 +01:00
kprobes.c [PATCH] i386: Kprobe rpl fix 2007-02-13 13:26:21 +01:00
ldt.c [PATCH] i386: remove default_ldt, and simplify ldt-setting. 2006-12-07 02:14:01 +01:00
machine_kexec.c [PATCH] i386: Avoid overwriting the current pgd (V4, i386) 2006-09-26 10:52:38 +02:00
mca.c [PATCH] i386: replace kmalloc+memset with kzalloc 2006-12-07 02:14:19 +01:00
microcode.c [PATCH] mark struct file_operations const 2 2007-02-12 09:48:44 -08:00
module.c [PATCH] Generic BUG for i386 2006-12-08 08:28:39 -08:00
mpparse.c ACPICA: use new ACPI headers. 2007-02-02 21:14:28 -05:00
msr.c [PATCH] i386: use smp_call_function_single() 2007-02-13 13:26:23 +01:00
nmi.c [PATCH] x86: fix laptop bootup hang in init_acpi() 2007-02-13 13:26:24 +01:00
numaq.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
paravirt.c [PATCH] i386: vMI timer patches 2007-02-13 13:26:21 +01:00
pci-dma.c [PATCH] i386: replace kmalloc+memset with kzalloc 2006-12-07 02:14:19 +01:00
process.c [PATCH] i386: add idle notifier 2007-02-13 13:26:22 +01:00
ptrace.c [PATCH] i386: Convert i386 PDA code to use %fs 2007-02-13 13:26:20 +01:00
quirks.c [PATCH] x86: Fix verify_quirk_intel_irqbalance() 2006-12-09 21:33:35 +01:00
reboot.c [PATCH] arch/i386/kernel/reboot.c should #include <linux/reboot.h> 2006-12-07 08:39:44 -08:00
reboot_fixups.c [PATCH] i386: Remove printk about reboot fixups at reboot 2006-04-09 11:53:53 -07:00
relocate_kernel.S [PATCH] i386: Avoid overwriting the current pgd (V4, i386) 2006-09-26 10:52:38 +02:00
scx200.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
setup.c [PATCH] i386: vMI backend for paravirt-ops 2007-02-13 13:26:21 +01:00
sigframe.h [PATCH] __user annotations for pointers in i386 sigframe 2005-09-09 10:31:59 -07:00
signal.c [PATCH] i386: Convert i386 PDA code to use %fs 2007-02-13 13:26:20 +01:00
smp.c [PATCH] i386: Small cleanup to TLB flush code 2007-02-13 13:26:23 +01:00
smpboot.c [PATCH] i386: vMI timer patches 2007-02-13 13:26:21 +01:00
srat.c ACPI: build fix for IBM x440 - CONFIG_X86_SUMMIT 2007-02-02 21:47:33 -05:00
summit.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_i386.c [PATCH] provide kernel_execve on all architectures 2006-10-02 07:57:23 -07:00
syscall_table.S [PATCH] epoll_pwait() 2006-10-11 11:14:21 -07:00
sysenter.c [PATCH] i386 vDSO: use install_special_mapping 2007-02-09 09:25:47 -08:00
time.c [PATCH] i386: Profile pc badness 2007-02-13 13:26:21 +01:00
time_hpet.c [PATCH] i386: Add iounmap in error paths in hpet code 2006-12-07 02:14:02 +01:00
topology.c [PATCH] i386: change the 'no_control' field to 'hotpluggable' in the struct cpu 2006-12-07 02:14:10 +01:00
trampoline.S [PATCH] i386: fix modpost warning in SMP trampoline code 2007-01-05 23:55:23 -08:00
traps.c [PATCH] i386: Convert i386 PDA code to use %fs 2007-02-13 13:26:20 +01:00
tsc.c [PATCH] i386: improve sched_clock() on i686 2007-02-13 13:26:22 +01:00
vm86.c [PATCH] i386: Convert i386 PDA code to use %fs 2007-02-13 13:26:20 +01:00
vmi.c [PATCH] i386: vMI timer patches 2007-02-13 13:26:21 +01:00
vmitime.c [PATCH] i386: Vmi timer race 2007-02-13 13:26:21 +01:00
vmlinux.lds.S [PATCH] i386: move startup_32() in text.head section 2007-02-13 13:26:22 +01:00
vsyscall-int80.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall-note.S [PATCH] i386 vDSO: add PT_NOTE segment 2005-04-16 15:24:48 -07:00
vsyscall-sigreturn.S [PATCH] Mark unwind info for signal trampolines in vDSOs 2006-03-31 12:18:52 -08:00
vsyscall-sysenter.S [PATCH] vdso: randomize the i386 vDSO by moving it into a vma 2006-06-27 17:32:38 -07:00
vsyscall.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall.lds.S [PATCH] vDSO hash-style fix 2006-07-31 13:28:43 -07:00