summaryrefslogtreecommitdiffstats
path: root/drivers/dax/device.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-11-08 00:31:23 +0100
committerDan Williams <dan.j.williams@intel.com>2019-01-07 06:41:55 +0100
commitd200781ef237a354d918ceff5cee350d88a93d42 (patch)
treeafd53c6e25a57e31b8c0c8542e086bd50840bc9a /drivers/dax/device.c
parentdevice-dax: Move resource pinning+mapping into the common driver (diff)
downloadlinux-d200781ef237a354d918ceff5cee350d88a93d42.tar.xz
linux-d200781ef237a354d918ceff5cee350d88a93d42.zip
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>
Diffstat (limited to 'drivers/dax/device.c')
-rw-r--r--drivers/dax/device.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/dax/device.c b/drivers/dax/device.c
index 6ad964d7b077..ad3120395f7a 100644
--- a/drivers/dax/device.c
+++ b/drivers/dax/device.c
@@ -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");