diff options
Diffstat (limited to 'arch/x86/kernel/smp.c')
-rw-r--r-- | arch/x86/kernel/smp.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index 74cca6014c0e..96af3a8e7326 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -174,10 +174,10 @@ asmlinkage void smp_reboot_interrupt(void) | |||
174 | irq_exit(); | 174 | irq_exit(); |
175 | } | 175 | } |
176 | 176 | ||
177 | static void native_smp_send_stop(void) | 177 | static void native_stop_other_cpus(int wait) |
178 | { | 178 | { |
179 | unsigned long flags; | 179 | unsigned long flags; |
180 | unsigned long wait; | 180 | unsigned long timeout; |
181 | 181 | ||
182 | if (reboot_force) | 182 | if (reboot_force) |
183 | return; | 183 | return; |
@@ -194,9 +194,12 @@ static void native_smp_send_stop(void) | |||
194 | if (num_online_cpus() > 1) { | 194 | if (num_online_cpus() > 1) { |
195 | apic->send_IPI_allbutself(REBOOT_VECTOR); | 195 | apic->send_IPI_allbutself(REBOOT_VECTOR); |
196 | 196 | ||
197 | /* Don't wait longer than a second */ | 197 | /* |
198 | wait = USEC_PER_SEC; | 198 | * Don't wait longer than a second if the caller |
199 | while (num_online_cpus() > 1 && wait--) | 199 | * didn't ask us to wait. |
200 | */ | ||
201 | timeout = USEC_PER_SEC; | ||
202 | while (num_online_cpus() > 1 && (wait || timeout--)) | ||
200 | udelay(1); | 203 | udelay(1); |
201 | } | 204 | } |
202 | 205 | ||
@@ -254,7 +257,7 @@ struct smp_ops smp_ops = { | |||
254 | .smp_prepare_cpus = native_smp_prepare_cpus, | 257 | .smp_prepare_cpus = native_smp_prepare_cpus, |
255 | .smp_cpus_done = native_smp_cpus_done, | 258 | .smp_cpus_done = native_smp_cpus_done, |
256 | 259 | ||
257 | .smp_send_stop = native_smp_send_stop, | 260 | .stop_other_cpus = native_stop_other_cpus, |
258 | .smp_send_reschedule = native_smp_send_reschedule, | 261 | .smp_send_reschedule = native_smp_send_reschedule, |
259 | 262 | ||
260 | .cpu_up = native_cpu_up, | 263 | .cpu_up = native_cpu_up, |