summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2018-03-29 19:48:15 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2018-03-29 19:48:15 +0000
commitd586f7b7baf5bb02f21102fa2f1325f207c8e66f (patch)
tree73d612e23f87332ab5c2e03a11773a0b996c28be /sys/arch
parentfeff6b99c312aa410a2189ffd5477fef1a99e1d8 (diff)
Initialize the secondary core's schedstate before spinning them up.
ok kettenis@
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm64/arm64/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/arm64/arm64/cpu.c b/sys/arch/arm64/arm64/cpu.c
index b88d4e81a15..e0fedfdc1b0 100644
--- a/sys/arch/arm64/arm64/cpu.c
+++ b/sys/arch/arm64/arm64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.16 2018/02/24 09:45:10 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.17 2018/03/29 19:48:14 patrick Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
@@ -265,6 +265,7 @@ cpu_attach(struct device *parent, struct device *dev, void *aux)
"cpu-release-addr", 0);
}
+ sched_init_cpu(ci);
if (cpu_hatch_secondary(ci, spinup_method, spinup_data)) {
atomic_setbits_int(&ci->ci_flags, CPUF_IDENTIFY);
__asm volatile("dsb sy; sev");
@@ -333,7 +334,6 @@ cpu_boot_secondary_processors(void)
continue;
ci->ci_randseed = (arc4random() & 0x7fffffff) + 1;
- sched_init_cpu(ci);
cpu_boot_secondary(ci);
}
}