[PATCH] i386: add idle notifier
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / i386 / kernel / smp.c
index 1b080ab..ffc4f65 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <asm/mtrr.h>
 #include <asm/tlbflush.h>
+#include <asm/idle.h>
 #include <mach_apic.h>
 
 /*
@@ -624,6 +625,7 @@ fastcall void smp_call_function_interrupt(struct pt_regs *regs)
        /*
         * At this point the info structure may be out of scope unless wait==1
         */
+       exit_idle();
        irq_enter();
        (*func)(info);
        irq_exit();
@@ -693,6 +695,10 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info,
                put_cpu();
                return -EBUSY;
        }
+
+       /* Can deadlock when called with interrupts disabled */
+       WARN_ON(irqs_disabled());
+
        spin_lock_bh(&call_lock);
        __smp_call_function_single(cpu, func, info, nonatomic, wait);
        spin_unlock_bh(&call_lock);