Postpone secondary CPUs until after mounthook activities. This is
authorpatrick <patrick@openbsd.org>
Thu, 11 Jan 2018 18:58:17 +0000 (18:58 +0000)
committerpatrick <patrick@openbsd.org>
Thu, 11 Jan 2018 18:58:17 +0000 (18:58 +0000)
useful for loading CPU microcode from the disk before the CPUs are
let go.

Tested by visa@ on sgi, loongson and octeon
"don't see immediate issues" kettenis@
ok deraadt@

sys/kern/init_main.c

index bc93662..2707617 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: init_main.c,v 1.272 2018/01/01 08:23:19 jsg Exp $     */
+/*     $OpenBSD: init_main.c,v 1.273 2018/01/11 18:58:17 patrick Exp $ */
 /*     $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $   */
 
 /*
@@ -546,13 +546,13 @@ main(void *framep)
                panic("fork zerothread");
 #endif
 
+       config_process_deferred_mountroot();
+
 #if defined(MULTIPROCESSOR)
        /* Boot the secondary processors. */
        cpu_boot_secondary_processors();
 #endif
 
-       config_process_deferred_mountroot();
-
        /*
         * Okay, now we can let init(8) exec!  It's off to userland!
         */