powerpc: move NMI entry/exit code into wrapper
[linux-2.6-microblaze.git] / arch / powerpc / kernel / watchdog.c
index be6b228..c9a8f47 100644 (file)
@@ -255,11 +255,12 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt)
        int cpu = raw_smp_processor_id();
        u64 tb;
 
+       /* should only arrive from kernel, with irqs disabled */
+       WARN_ON_ONCE(!arch_irq_disabled_regs(regs));
+
        if (!cpumask_test_cpu(cpu, &wd_cpus_enabled))
                return 0;
 
-       nmi_enter();
-
        __this_cpu_inc(irq_stat.soft_nmi_irqs);
 
        tb = get_tb();
@@ -267,7 +268,7 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt)
                wd_smp_lock(&flags);
                if (cpumask_test_cpu(cpu, &wd_smp_cpus_stuck)) {
                        wd_smp_unlock(&flags);
-                       goto out;
+                       return 0;
                }
                set_cpu_stuck(cpu, tb);
 
@@ -291,9 +292,6 @@ DEFINE_INTERRUPT_HANDLER_NMI(soft_nmi_interrupt)
        if (wd_panic_timeout_tb < 0x7fffffff)
                mtspr(SPRN_DEC, wd_panic_timeout_tb);
 
-out:
-       nmi_exit();
-
        return 0;
 }