diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-04-29 16:49:54 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-04-29 16:49:54 +0000 |
commit | 756287851c4d370ca8d0151567320f37e3d877a0 (patch) | |
tree | 22e91cee93b0e5e73fc0cf29c9df78ad04b3fefe /sys/arch/i386 | |
parent | 1db129d3a2c32af82c31787b0daabbdefe44bfce (diff) |
Call sched_init_cpu() just before booting secondary CPUs.
This prevent the scheduler from scheduling tasks to CPUs not beeing able
to execute them during the boot process.
ok visa@, kettenis@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/cpu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/cpu.c b/sys/arch/i386/i386/cpu.c index e7b434838c5..4d1c18c52d1 100644 --- a/sys/arch/i386/i386/cpu.c +++ b/sys/arch/i386/i386/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.74 2016/03/17 13:18:47 mpi Exp $ */ +/* $OpenBSD: cpu.c,v 1.75 2016/04/29 16:49:53 mpi Exp $ */ /* $NetBSD: cpu.c,v 1.1.2.7 2000/06/26 02:04:05 sommerfeld Exp $ */ /*- @@ -323,7 +323,6 @@ cpu_attach(struct device *parent, struct device *self, void *aux) gdt_alloc_cpu(ci); ci->ci_flags |= CPUF_PRESENT | CPUF_AP; identifycpu(ci); - sched_init_cpu(ci); ci->ci_next = cpu_info_list->ci_next; cpu_info_list->ci_next = ci; ncpus++; @@ -500,6 +499,7 @@ cpu_boot_secondary_processors(void) continue; if (ci->ci_flags & (CPUF_BSP|CPUF_SP|CPUF_PRIMARY)) continue; + sched_init_cpu(ci); ci->ci_randseed = (arc4random() & 0x7fffffff) + 1; cpu_boot_secondary(ci); } |