Re: CVS commit: src/sys/dev/nvmm
Le 08/04/2019 à 09:57, Paul Goyette a écrit : On Mon, 8 Apr 2019, Maxime Villard wrote: The reason I use MODULE_CLASS_ANY in both NVMM and KCOV is because this class is invoked late in the boot process (init_main.c). Eg NVMM will use allocators/xcalls which are not yet initialized in MODULE_CLASS_DRIVER, but are in MODULE_CLASS_ANY. No, at that late point in the boot process we load/activate all remaining modules without looking at their class at all! Please see the MODULE_CALSS_MATCH() macro at https://nxr.netbsd.org/xref/src/sys/kern/kern_module.c#130 Also please note that the module(9) man page explicitly lists the valid entries for the MODULE(class, ...) macro, and MODULE_CLASS_ANY is _not_ listed. We're not loading "modules whose class is MODULE_CLASS_ANY" we are loading "all remaining modules". Please update your module to use MODULE_CLASS_MISC (or let me know and I can do it). Fixed, indeed it should have been _MISC and not _ANY. However autoloading still doesn't work, because it expects _DRIVER, and NVMM can't work with _DRIVER.
Re: CVS commit: src/sys/dev/nvmm
On Mon, 8 Apr 2019, Maxime Villard wrote: The reason I use MODULE_CLASS_ANY in both NVMM and KCOV is because this class is invoked late in the boot process (init_main.c). Eg NVMM will use allocators/xcalls which are not yet initialized in MODULE_CLASS_DRIVER, but are in MODULE_CLASS_ANY. No, at that late point in the boot process we load/activate all remaining modules without looking at their class at all! Please see the MODULE_CALSS_MATCH() macro at https://nxr.netbsd.org/xref/src/sys/kern/kern_module.c#130 Also please note that the module(9) man page explicitly lists the valid entries for the MODULE(class, ...) macro, and MODULE_CLASS_ANY is _not_ listed. We're not loading "modules whose class is MODULE_CLASS_ANY" we are loading "all remaining modules". Please update your module to use MODULE_CLASS_MISC (or let me know and I can do it). ++--+---+ | Paul Goyette | PGP Key fingerprint: | E-mail addresses: | | (Retired) | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com | | Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org | ++--+---+