aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/mp_machdep.c
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2018-02-28 16:03:40 +0000
committerAndrew Turner <andrew@FreeBSD.org>2018-02-28 16:03:40 +0000
commite9c0572e4c86a18fd05f620019fbc9720b9d76a5 (patch)
tree3130227b30b7b99d8ef52e8cceb006e82c5401b4 /sys/arm64/arm64/mp_machdep.c
parent5373a0ae90eef40b3299f97d7f6fa4fbe2308ee3 (diff)
downloadsrc-e9c0572e4c86a18fd05f620019fbc9720b9d76a5.tar.gz
src-e9c0572e4c86a18fd05f620019fbc9720b9d76a5.zip
Allow releasing APs to take more time, as long as we are making progress.
On large core count machines this can be slow while all the CPUs update the online counter. Sponsored by: DARPA, AFRL Sponsored by: Cavium (Hardware)
Notes
Notes: svn path=/head/; revision=330120
Diffstat (limited to 'sys/arm64/arm64/mp_machdep.c')
-rw-r--r--sys/arm64/arm64/mp_machdep.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index 9ea0a2ba400c..ad97195cb864 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -221,7 +221,7 @@ arm64_cpu_attach(device_t dev)
static void
release_aps(void *dummy __unused)
{
- int i;
+ int i, started;
/* Only release CPUs if they exist */
if (mp_ncpus == 1)
@@ -241,11 +241,22 @@ release_aps(void *dummy __unused)
"sev \n"
::: "memory");
- printf("Release APs\n");
+ printf("Release APs...");
+ started = 0;
for (i = 0; i < 2000; i++) {
- if (smp_started)
+ if (smp_started) {
+ printf("done\n");
return;
+ }
+ /*
+ * Don't time out while we are making progress. Some large
+ * systems can take a while to start all CPUs.
+ */
+ if (smp_cpus > started) {
+ i = 0;
+ started = smp_cpus;
+ }
DELAY(1000);
}