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



Le 07/04/2019 à 22:58, Paul Goyette a écrit :
On Sun, 7 Apr 2019, Maxime Villard wrote:

Module Name:    src
Committed By:    maxv
Date:        Sun Apr  7 14:05:15 UTC 2019

Modified Files:
    src/sys/dev/nvmm: nvmm.c

Log Message:
Don't allow unloading when there are still VMs registered, and don't allow
auto-unloading at all. Not a big problem actually, because since I changed
the module class it's not auto-loadable anymore.

There's a better way to prevent auto-loading using a proplib file;  it
isn't necessary to adjust the module's class.

Also, MODULE_CLASS_ANY isn't intended to be used as a module's CLASS.
MODULE_CLASS_ANY is intended for "wildcard" matching of the class in
module_load().  For this you probably ought to use MODULE_CLASS_MISC.

(Kamil, you probably also should change the kcov driver module to use
MODULE_CLASS_MISC)

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.

That this prevents autoloading is not the goal of the move, but a side
effect.


Home | Main Index | Thread Index | Old Index