From: Ingo Molnar NMIs confuse lockdep, so we work around this problem by disabling NMI sources. The exact reason is not fully understood yet, but suspicion is on irq-disabling done within NMI handlers and this confusing the irq-flags tracing code - and hence confusing lockdep too. Another potential problem could be the entry.S return code for NMIs - if that doesnt trace irq flags correctly then that too could break lockdep. This issue is under investigation. Cc: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- arch/x86_64/kernel/nmi.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff -puN arch/x86_64/kernel/nmi.c~lock-validator-disable-nmi-watchdog-if-config_lockdep-x86_64 arch/x86_64/kernel/nmi.c --- devel/arch/x86_64/kernel/nmi.c~lock-validator-disable-nmi-watchdog-if-config_lockdep-x86_64 2006-06-07 08:37:02.000000000 -0700 +++ devel-akpm/arch/x86_64/kernel/nmi.c 2006-06-07 08:37:28.000000000 -0700 @@ -214,18 +214,6 @@ int __init check_nmi_watchdog (void) int *counts; int cpu; -#ifdef CONFIG_LOCKDEP - /* - * The NMI watchdog uses spinlocks (notifier chains, etc.), - * so it's not lockdep-safe: - */ - nmi_watchdog = 0; - for_each_online_cpu(cpu) - per_cpu(nmi_watchdog_ctlblk.enabled, cpu) = 0; - - printk("lockdep: disabled NMI watchdog.\n"); - return 0; -#endif if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) return 0; @@ -686,6 +674,17 @@ void setup_apic_nmi_watchdog(void *unuse { struct nmi_watchdog_ctlblk *wd = &__get_cpu_var(nmi_watchdog_ctlblk); +#ifdef CONFIG_LOCKDEP + /* + * The NMI watchdog uses spinlocks (notifier chains, etc.), + * so it's not lockdep-safe: + */ + nmi_watchdog = NMI_NONE; + printk("lockdep: disabled NMI watchdog.\n"); + + return; +#endif + /* only support LOCAL and IO APICs for now */ if ((nmi_watchdog != NMI_LOCAL_APIC) && (nmi_watchdog != NMI_IO_APIC)) _