x86: call check_nmi_watchdog explicitly in native_smp_cpus_done
[sfrench/cifs-2.6.git] / arch / x86 / kernel / nmi_32.c
index edd413650b3b06954b65ab05664ae0d6f8e3a3e5..9cfc094eddb0cea59c2adcb9fc66f5662e054e66 100644 (file)
@@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ;
 
 static DEFINE_PER_CPU(short, wd_enabled);
 
-/* local prototypes */
-static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu);
-
 static int endflag __initdata = 0;
 
 #ifdef CONFIG_SMP
@@ -70,7 +67,7 @@ static __init void nmi_cpu_busy(void *data)
 }
 #endif
 
-static int __init check_nmi_watchdog(void)
+int __init check_nmi_watchdog(void)
 {
        unsigned int *prev_nmi_count;
        int cpu;
@@ -132,8 +129,6 @@ static int __init check_nmi_watchdog(void)
        kfree(prev_nmi_count);
        return 0;
 }
-/* This needs to happen later in boot so counters are working */
-late_initcall(check_nmi_watchdog);
 
 static int __init setup_nmi_watchdog(char *str)
 {
@@ -391,15 +386,6 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason)
        return rc;
 }
 
-int do_nmi_callback(struct pt_regs * regs, int cpu)
-{
-#ifdef CONFIG_SYSCTL
-       if (unknown_nmi_panic)
-               return unknown_nmi_panic_callback(regs, cpu);
-#endif
-       return 0;
-}
-
 #ifdef CONFIG_SYSCTL
 
 static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
@@ -453,6 +439,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file,
 
 #endif
 
+int do_nmi_callback(struct pt_regs *regs, int cpu)
+{
+#ifdef CONFIG_SYSCTL
+       if (unknown_nmi_panic)
+               return unknown_nmi_panic_callback(regs, cpu);
+#endif
+       return 0;
+}
+
 void __trigger_all_cpu_backtrace(void)
 {
        int i;