device-dax: Add support for a dax override driver
Introduce the 'new_id' concept for enabling a custom device-driver attach policy for dax-bus drivers. The intended use is to have a mechanism for hot-plugging device-dax ranges into the page allocator on-demand. With this in place the default policy of using device-dax for performance differentiated memory can be overridden by user-space policy that can arrange for the memory range to be managed as 'System RAM' with user-defined NUMA and other performance attributes. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -504,9 +504,12 @@ static int dev_dax_remove(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct device_driver device_dax_driver = {
|
||||
.probe = dev_dax_probe,
|
||||
.remove = dev_dax_remove,
|
||||
static struct dax_device_driver device_dax_driver = {
|
||||
.drv = {
|
||||
.probe = dev_dax_probe,
|
||||
.remove = dev_dax_remove,
|
||||
},
|
||||
.match_always = 1,
|
||||
};
|
||||
|
||||
static int __init dax_init(void)
|
||||
@@ -516,7 +519,7 @@ static int __init dax_init(void)
|
||||
|
||||
static void __exit dax_exit(void)
|
||||
{
|
||||
driver_unregister(&device_dax_driver);
|
||||
dax_driver_unregister(&device_dax_driver);
|
||||
}
|
||||
|
||||
MODULE_AUTHOR("Intel Corporation");
|
||||
|
Reference in New Issue
Block a user