diff options
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index a6a4729e0e94..1c59ec161cf8 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -114,24 +114,27 @@ extern void s390_handle_mcck(void); | |||
114 | static void default_idle(void) | 114 | static void default_idle(void) |
115 | { | 115 | { |
116 | int cpu, rc; | 116 | int cpu, rc; |
117 | int nr_calls = 0; | ||
118 | void *hcpu; | ||
117 | #ifdef CONFIG_SMP | 119 | #ifdef CONFIG_SMP |
118 | struct s390_idle_data *idle; | 120 | struct s390_idle_data *idle; |
119 | #endif | 121 | #endif |
120 | 122 | ||
121 | /* CPU is going idle. */ | 123 | /* CPU is going idle. */ |
122 | cpu = smp_processor_id(); | 124 | cpu = smp_processor_id(); |
123 | 125 | hcpu = (void *)(long)cpu; | |
124 | local_irq_disable(); | 126 | local_irq_disable(); |
125 | if (need_resched()) { | 127 | if (need_resched()) { |
126 | local_irq_enable(); | 128 | local_irq_enable(); |
127 | return; | 129 | return; |
128 | } | 130 | } |
129 | 131 | ||
130 | rc = atomic_notifier_call_chain(&idle_chain, | 132 | rc = __atomic_notifier_call_chain(&idle_chain, S390_CPU_IDLE, hcpu, -1, |
131 | S390_CPU_IDLE, (void *)(long) cpu); | 133 | &nr_calls); |
132 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) | 134 | if (rc == NOTIFY_BAD) { |
133 | BUG(); | 135 | nr_calls--; |
134 | if (rc != NOTIFY_OK) { | 136 | __atomic_notifier_call_chain(&idle_chain, S390_CPU_NOT_IDLE, |
137 | hcpu, nr_calls, NULL); | ||
135 | local_irq_enable(); | 138 | local_irq_enable(); |
136 | return; | 139 | return; |
137 | } | 140 | } |