]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/s390/kernel/process.c
Merge branches 'release', 'bugzilla-8570', 'bugzilla-9966', 'bugzilla-9998', 'bugzill...
[linux-2.6-omap-h63xx.git] / arch / s390 / kernel / process.c
index 0e7aca0393070d3ca19538c130b1b5491bdb4681..ce203154d8ce3a6c8f9bf4a07cd7ad072e3b3ec8 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
@@ -115,24 +114,27 @@ extern void s390_handle_mcck(void);
 static void default_idle(void)
 {
        int cpu, rc;
+       int nr_calls = 0;
+       void *hcpu;
 #ifdef CONFIG_SMP
        struct s390_idle_data *idle;
 #endif
 
        /* CPU is going idle. */
        cpu = smp_processor_id();
-
+       hcpu = (void *)(long)cpu;
        local_irq_disable();
        if (need_resched()) {
                local_irq_enable();
                return;
        }
 
-       rc = atomic_notifier_call_chain(&idle_chain,
-                                       S390_CPU_IDLE, (void *)(long) cpu);
-       if (rc != NOTIFY_OK && rc != NOTIFY_DONE)
-               BUG();
-       if (rc != NOTIFY_OK) {
+       rc = __atomic_notifier_call_chain(&idle_chain, S390_CPU_IDLE, hcpu, -1,
+                                         &nr_calls);
+       if (rc == NOTIFY_BAD) {
+               nr_calls--;
+               __atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE,
+                                            hcpu, nr_calls, NULL);
                local_irq_enable();
                return;
        }
@@ -150,6 +152,10 @@ static void default_idle(void)
        local_mcck_disable();
        if (test_thread_flag(TIF_MCCK_PENDING)) {
                local_mcck_enable();
+               /* disable monitor call class 0 */
+               __ctl_clear_bit(8, 15);
+               atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE,
+                                          hcpu);
                local_irq_enable();
                s390_handle_mcck();
                return;