summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-03-29 00:10:02 -0700
committerAaron Durbin <adurbin@chromium.org>2018-04-01 20:01:34 +0000
commitd6630d1165c844913325a0c36ab6352a33622c7e (patch)
tree538ea9bbcf9725f3cf5cae78f97c9e374936f5d7
parent7824d9bf699e245ff5c21262ff51acaeac0186af (diff)
downloadcoreboot-d6630d1165c844913325a0c36ab6352a33622c7e.tar.xz
x86: Increase time out for parking APs to 250ms
Change f43adf0 (intel/common/block/cpu: Change post_cpus_init after BS_DEV RESOURCES) moved post_cpus_init to BS_OS_RESUME for S3 path. This results in BSP timing out waiting for APs to be parked. This change increases the time out value for APs to be parked to 250ms. This value was chosen after running suspend-resume stress test and capturing the maximum time taken for APs to be parked for 100 iterations. Typical values observed were ~150ms. Maximum value observed was 152ms. BUG=b:76442753 TEST=Verified for 100 iterations that suspend-resume does not run into any AP park time out. Change-Id: Id3e59db4fe7a5a2fb60357b05565bba89be1e00e Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/25422 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
-rw-r--r--src/arch/x86/cpu.c3
-rw-r--r--src/cpu/x86/mp_init.c19
2 files changed, 19 insertions, 3 deletions
diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c
index cfcfdbd5d2..142f2b1400 100644
--- a/src/arch/x86/cpu.c
+++ b/src/arch/x86/cpu.c
@@ -309,6 +309,5 @@ void arch_bootstate_coreboot_exit(void)
return;
/* APs are waiting for work. Last thing to do is park them. */
- if (mp_park_aps())
- printk(BIOS_ERR, "Parking APs failed.\n");
+ mp_park_aps();
}
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 409caa5a83..f99abaf245 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -962,7 +962,24 @@ int mp_run_on_all_cpus(void (*func)(void), long expire_us)
int mp_park_aps(void)
{
- return mp_run_on_aps(park_this_cpu, 10 * USECS_PER_MSEC);
+ struct stopwatch sw;
+ int ret;
+ long duration_msecs;
+
+ stopwatch_init(&sw);
+
+ ret = mp_run_on_aps(park_this_cpu, 250 * USECS_PER_MSEC);
+
+ duration_msecs = stopwatch_duration_msecs(&sw);
+
+ if (!ret)
+ printk(BIOS_DEBUG, "%s done after %ld msecs.\n", __func__,
+ duration_msecs);
+ else
+ printk(BIOS_ERR, "%s failed after %ld msecs.\n", __func__,
+ duration_msecs);
+
+ return ret;
}
static struct mp_flight_record mp_steps[] = {