Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index