summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-03-29 19:48:14 +0000
committerpatrick <patrick@openbsd.org>2018-03-29 19:48:14 +0000
commit8305eac4ddf7381b5f2e4c9cd145a9e8f6f32ca9 (patch)
tree3819c9460f64c2defef5cff285a457feca6ae98f /sys
parentCheck the result of strdup not the argument for NULL to report malloc (diff)
downloadwireguard-openbsd-8305eac4ddf7381b5f2e4c9cd145a9e8f6f32ca9.tar.xz
wireguard-openbsd-8305eac4ddf7381b5f2e4c9cd145a9e8f6f32ca9.zip
Initialize the secondary core's schedstate before spinning them up.
ok kettenis@
Diffstat (limited to 'sys')
-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);
}
}