diff options
Diffstat (limited to 'src/cpu/x86')
-rw-r--r-- | src/cpu/x86/mp_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index f99abaf245..585a54b86d 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -907,7 +907,9 @@ static int run_ap_work(mp_callback_t func, long expire_us) mfence(); /* Wait for all the APs to signal back that call has been accepted. */ - stopwatch_init_usecs_expire(&sw, expire_us); + if (expire_us > 0) + stopwatch_init_usecs_expire(&sw, expire_us); + do { cpus_accepted = 0; @@ -920,7 +922,7 @@ static int run_ap_work(mp_callback_t func, long expire_us) if (cpus_accepted == global_num_aps) return 0; - } while (!stopwatch_expired(&sw)); + } while (expire_us <= 0 || !stopwatch_expired(&sw)); printk(BIOS_ERR, "AP call expired. %d/%d CPUs accepted.\n", cpus_accepted, global_num_aps); |