diff options
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 66ca5757e368..78b64fe5e7c2 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -99,14 +99,15 @@ void default_idle(void) | |||
99 | { | 99 | { |
100 | int cpu, rc; | 100 | int cpu, rc; |
101 | 101 | ||
102 | /* CPU is going idle. */ | ||
103 | cpu = smp_processor_id(); | ||
104 | |||
102 | local_irq_disable(); | 105 | local_irq_disable(); |
103 | if (need_resched()) { | 106 | if (need_resched()) { |
104 | local_irq_enable(); | 107 | local_irq_enable(); |
105 | return; | 108 | return; |
106 | } | 109 | } |
107 | 110 | ||
108 | /* CPU is going idle. */ | ||
109 | cpu = smp_processor_id(); | ||
110 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); | 111 | rc = notifier_call_chain(&idle_chain, CPU_IDLE, (void *)(long) cpu); |
111 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) | 112 | if (rc != NOTIFY_OK && rc != NOTIFY_DONE) |
112 | BUG(); | 113 | BUG(); |
@@ -119,7 +120,7 @@ void default_idle(void) | |||
119 | __ctl_set_bit(8, 15); | 120 | __ctl_set_bit(8, 15); |
120 | 121 | ||
121 | #ifdef CONFIG_HOTPLUG_CPU | 122 | #ifdef CONFIG_HOTPLUG_CPU |
122 | if (cpu_is_offline(smp_processor_id())) | 123 | if (cpu_is_offline(cpu)) |
123 | cpu_die(); | 124 | cpu_die(); |
124 | #endif | 125 | #endif |
125 | 126 | ||