@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.504.2.1 2020/11/14 15:36:11 martin Exp $ */
+/* $NetBSD: init_main.c,v 1.504.2.2 2021/01/03 12:51:33 martin Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.504.2.1 2020/11/14 15:36:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.504.2.2 2021/01/03 12:51:33 martin Exp $");
#include "opt_ddb.h"
#include "opt_inet.h"
@@ -668,6 +668,11 @@
cpu_rootconf();
cpu_dumpconf();
+ /* Create the aiodone daemon kernel thread. */
+ if (workqueue_create(&uvm.aiodone_queue, "aiodoned",
+ uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE))
+ panic("fork aiodoned");
+
/* Mount the root file system. */
do {
domountroothook(root_device);
@@ -735,11 +740,6 @@
if (kthread_create(PRI_IOFLUSH, KTHREAD_MPSAFE, NULL, sched_sync,
NULL, NULL, "ioflush"))
panic("fork syncer");
-
- /* Create the aiodone daemon kernel thread. */
- if (workqueue_create(&uvm.aiodone_queue, "aiodoned",
- uvm_aiodone_worker, NULL, PRI_VM, IPL_NONE, WQ_MPSAFE))
- panic("fork aiodoned");
/* Wait for final configure threads to complete. */
config_finalize_mountroot();