Module Name: src Committed By: ad Date: Sun Dec 1 17:08:31 UTC 2019
Modified Files: src/sys/kern: init_main.c Log Message: Init kern_runq and kern_synch before booting secondary CPUs. To generate a diff of this commit: cvs rdiff -u -r1.506 -r1.507 src/sys/kern/init_main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/init_main.c diff -u src/sys/kern/init_main.c:1.506 src/sys/kern/init_main.c:1.507 --- src/sys/kern/init_main.c:1.506 Thu Oct 3 22:29:17 2019 +++ src/sys/kern/init_main.c Sun Dec 1 17:08:31 2019 @@ -1,7 +1,7 @@ -/* $NetBSD: init_main.c,v 1.506 2019/10/03 22:29:17 kamil Exp $ */ +/* $NetBSD: init_main.c,v 1.507 2019/12/01 17:08:31 ad Exp $ */ /*- - * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2008, 2009, 2019 The NetBSD Foundation, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -97,7 +97,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.506 2019/10/03 22:29:17 kamil Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.507 2019/12/01 17:08:31 ad Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -799,6 +799,10 @@ configure2(void) curcpu()->ci_schedstate.spc_flags |= SPCF_RUNNING; splx(s); + /* Setup the runqueues and scheduler. */ + runq_init(); + synch_init(); + /* Boot the secondary processors. */ for (CPU_INFO_FOREACH(cii, ci)) { uvm_cpu_attach(ci); @@ -808,10 +812,6 @@ configure2(void) cpu_boot_secondary_processors(); #endif - /* Setup the runqueues and scheduler. */ - runq_init(); - synch_init(); - /* * Bus scans can make it appear as if the system has paused, so * twiddle constantly while config_interrupts() jobs are running.