summaryrefslogtreecommitdiff
path: root/drivers/dax/bus.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-11-07 15:31:23 -0800
committerDan Williams <dan.j.williams@intel.com>2019-01-06 21:41:55 -0800
commitd200781ef237a354d918ceff5cee350d88a93d42 (patch)
treeafd53c6e25a57e31b8c0c8542e086bd50840bc9a /drivers/dax/bus.h
parent89ec9f2cfa36cc5fca2fb445ed221bb9add7b536 (diff)
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/bus.h')
-rw-r--r--drivers/dax/bus.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/dax/bus.h b/drivers/dax/bus.h
index e08e0c394983..395ab812367c 100644
--- a/drivers/dax/bus.h
+++ b/drivers/dax/bus.h
@@ -12,10 +12,18 @@ struct dax_region *alloc_dax_region(struct device *parent, int region_id,
struct resource *res, unsigned int align, unsigned long flags);
struct dev_dax *devm_create_dev_dax(struct dax_region *dax_region, int id,
struct dev_pagemap *pgmap);
-int __dax_driver_register(struct device_driver *drv,
+
+struct dax_device_driver {
+ struct device_driver drv;
+ struct list_head ids;
+ int match_always;
+};
+
+int __dax_driver_register(struct dax_device_driver *dax_drv,
struct module *module, const char *mod_name);
#define dax_driver_register(driver) \
__dax_driver_register(driver, THIS_MODULE, KBUILD_MODNAME)
+void dax_driver_unregister(struct dax_device_driver *dax_drv);
void kill_dev_dax(struct dev_dax *dev_dax);
/*