diff --git a/sys/kern/bufq_disksort.c b/sys/kern/bufq_disksort.c index 7af9751f0b19..76687575205d 100644 --- a/sys/kern/bufq_disksort.c +++ b/sys/kern/bufq_disksort.c @@ -1,4 +1,4 @@ -/* $NetBSD: bufq_disksort.c,v 1.12 2016/11/16 00:46:46 pgoyette Exp $ */ +/* $NetBSD: bufq_disksort.c,v 1.13 2016/11/16 10:42:14 pgoyette Exp $ */ /* NetBSD: subr_disk.c,v 1.61 2004/09/25 03:30:44 thorpej Exp */ /*- @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bufq_disksort.c,v 1.12 2016/11/16 00:46:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bufq_disksort.c,v 1.13 2016/11/16 10:42:14 pgoyette Exp $"); #include #include @@ -229,7 +229,7 @@ bufq_disksort_init(struct bufq_state *bufq) TAILQ_INIT(&disksort->bq_head); } -MODULE(MODULE_CLASS_MISC, bufq_disksort, NULL); +MODULE(MODULE_CLASS_BUFQ, bufq_disksort, NULL); static int bufq_disksort_modcmd(modcmd_t cmd, void *opaque) diff --git a/sys/kern/bufq_fcfs.c b/sys/kern/bufq_fcfs.c index 4eb10a88ef09..34ccaaf771d4 100644 --- a/sys/kern/bufq_fcfs.c +++ b/sys/kern/bufq_fcfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: bufq_fcfs.c,v 1.11 2016/11/16 00:46:46 pgoyette Exp $ */ +/* $NetBSD: bufq_fcfs.c,v 1.12 2016/11/16 10:42:14 pgoyette Exp $ */ /* NetBSD: subr_disk.c,v 1.61 2004/09/25 03:30:44 thorpej Exp */ /*- @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bufq_fcfs.c,v 1.11 2016/11/16 00:46:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bufq_fcfs.c,v 1.12 2016/11/16 10:42:14 pgoyette Exp $"); #include #include @@ -153,7 +153,7 @@ bufq_fcfs_init(struct bufq_state *bufq) TAILQ_INIT(&fcfs->bq_head); } -MODULE(MODULE_CLASS_MISC, bufq_fcfs, NULL); +MODULE(MODULE_CLASS_BUFQ, bufq_fcfs, NULL); static int bufq_fcfs_modcmd(modcmd_t cmd, void *opaque) diff --git a/sys/kern/bufq_priocscan.c b/sys/kern/bufq_priocscan.c index 7caabc4e737a..b75f16d3a364 100644 --- a/sys/kern/bufq_priocscan.c +++ b/sys/kern/bufq_priocscan.c @@ -1,4 +1,4 @@ -/* $NetBSD: bufq_priocscan.c,v 1.19 2016/11/16 00:46:46 pgoyette Exp $ */ +/* $NetBSD: bufq_priocscan.c,v 1.20 2016/11/16 10:42:14 pgoyette Exp $ */ /*- * Copyright (c)2004,2005,2006,2008,2009,2011,2012 YAMAMOTO Takashi, @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bufq_priocscan.c,v 1.19 2016/11/16 00:46:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bufq_priocscan.c,v 1.20 2016/11/16 10:42:14 pgoyette Exp $"); #include #include @@ -444,7 +444,7 @@ bufq_priocscan_init(struct bufq_state *bufq) } } -MODULE(MODULE_CLASS_MISC, bufq_priocscan, NULL); +MODULE(MODULE_CLASS_BUFQ, bufq_priocscan, NULL); static int bufq_priocscan_modcmd(modcmd_t cmd, void *opaque) diff --git a/sys/kern/bufq_readprio.c b/sys/kern/bufq_readprio.c index e136d6a49b0d..0c8ac6aa7286 100644 --- a/sys/kern/bufq_readprio.c +++ b/sys/kern/bufq_readprio.c @@ -1,4 +1,4 @@ -/* $NetBSD: bufq_readprio.c,v 1.14 2016/11/16 00:46:46 pgoyette Exp $ */ +/* $NetBSD: bufq_readprio.c,v 1.15 2016/11/16 10:42:14 pgoyette Exp $ */ /* NetBSD: subr_disk.c,v 1.61 2004/09/25 03:30:44 thorpej Exp */ /*- @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bufq_readprio.c,v 1.14 2016/11/16 00:46:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bufq_readprio.c,v 1.15 2016/11/16 10:42:14 pgoyette Exp $"); #include #include @@ -281,7 +281,7 @@ bufq_readprio_init(struct bufq_state *bufq) TAILQ_INIT(&prio->bq_write); } -MODULE(MODULE_CLASS_MISC, bufq_readprio, NULL); +MODULE(MODULE_CLASS_BUFQ, bufq_readprio, NULL); static int bufq_readprio_modcmd(modcmd_t cmd, void *opaque) diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 5b2626c132ac..05de6d433775 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.485 2016/11/16 00:46:46 pgoyette Exp $ */ +/* $NetBSD: init_main.c,v 1.486 2016/11/16 10:42:14 pgoyette Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.485 2016/11/16 00:46:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.486 2016/11/16 10:42:14 pgoyette Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -484,6 +484,12 @@ main(void) /* Initialize sockets thread(s) */ soinit1(); + /* + * Initialize the bufq strategy modules - they may be needed + * by some devices during configuration + */ + module_init_class(MODULE_CLASS_BUFQ); + /* Configure the system hardware. This will enable interrupts. */ configure(); diff --git a/sys/kern/subr_bufq.c b/sys/kern/subr_bufq.c index 2e37e32f8129..04d9a88afb60 100644 --- a/sys/kern/subr_bufq.c +++ b/sys/kern/subr_bufq.c @@ -1,4 +1,4 @@ -/* $NetBSD: subr_bufq.c,v 1.22 2016/11/16 00:46:46 pgoyette Exp $ */ +/* $NetBSD: subr_bufq.c,v 1.23 2016/11/16 10:42:14 pgoyette Exp $ */ /* NetBSD: subr_disk.c,v 1.70 2005/08/20 12:00:01 yamt Exp $ */ /*- @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_bufq.c,v 1.22 2016/11/16 00:46:46 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_bufq.c,v 1.23 2016/11/16 10:42:14 pgoyette Exp $"); #include #include @@ -182,7 +182,7 @@ bufq_alloc(struct bufq_state **bufqp, const char *strategy, int flags) strlcpy(module_name, "bufq_", sizeof(module_name)); strlcat(module_name, strategy, sizeof(module_name)); mutex_exit(&bufq_mutex); - (void) module_autoload(module_name, MODULE_CLASS_MISC); + (void) module_autoload(module_name, MODULE_CLASS_BUFQ); mutex_enter(&bufq_mutex); } while (gen != module_gen); diff --git a/sys/sys/module.h b/sys/sys/module.h index 8d8f67fcca9c..28e37a4df08c 100644 --- a/sys/sys/module.h +++ b/sys/sys/module.h @@ -1,4 +1,4 @@ -/* $NetBSD: module.h,v 1.40 2016/01/18 16:46:08 pooka Exp $ */ +/* $NetBSD: module.h,v 1.41 2016/11/16 10:42:14 pgoyette Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -45,7 +45,8 @@ typedef enum modclass { MODULE_CLASS_VFS, MODULE_CLASS_DRIVER, MODULE_CLASS_EXEC, - MODULE_CLASS_SECMODEL + MODULE_CLASS_SECMODEL, + MODULE_CLASS_BUFQ } modclass_t; /* Module sources: where did it come from? */