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 d801210945d6..513deac7228d 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -159,10 +159,10 @@ asmlinkage void smp_reboot_interrupt(void) | |||
159 | irq_exit(); | 159 | irq_exit(); |
160 | } | 160 | } |
161 | 161 | ||
162 | static void native_smp_send_stop(void) | 162 | static void native_stop_other_cpus(int wait) |
163 | { | 163 | { |
164 | unsigned long flags; | 164 | unsigned long flags; |
165 | unsigned long wait; | 165 | unsigned long timeout; |
166 | 166 | ||
167 | if (reboot_force) | 167 | if (reboot_force) |
168 | return; | 168 | return; |
@@ -179,9 +179,12 @@ static void native_smp_send_stop(void) | |||
179 | if (num_online_cpus() > 1) { | 179 | if (num_online_cpus() > 1) { |
180 | apic->send_IPI_allbutself(REBOOT_VECTOR); | 180 | apic->send_IPI_allbutself(REBOOT_VECTOR); |
181 | 181 | ||
182 | /* Don't wait longer than a second */ | 182 | /* |
183 | wait = USEC_PER_SEC; | 183 | * Don't wait longer than a second if the caller |
184 | while (num_online_cpus() > 1 && wait--) | 184 | * didn't ask us to wait. |
185 | */ | ||
186 | timeout = USEC_PER_SEC; | ||
187 | while (num_online_cpus() > 1 && (wait || timeout--)) | ||
185 | udelay(1); | 188 | udelay(1); |
186 | } | 189 | } |
187 | 190 | ||
@@ -227,7 +230,7 @@ struct smp_ops smp_ops = { | |||
227 | .smp_prepare_cpus = native_smp_prepare_cpus, | 230 | .smp_prepare_cpus = native_smp_prepare_cpus, |
228 | .smp_cpus_done = native_smp_cpus_done, | 231 | .smp_cpus_done = native_smp_cpus_done, |
229 | 232 | ||
230 | .smp_send_stop = native_smp_send_stop, | 233 | .stop_other_cpus = native_stop_other_cpus, |
231 | .smp_send_reschedule = native_smp_send_reschedule, | 234 | .smp_send_reschedule = native_smp_send_reschedule, |
232 | 235 | ||
233 | .cpu_up = native_cpu_up, | 236 | .cpu_up = native_cpu_up, |