summaryrefslogtreecommitdiffstats
path: root/drivers/dax/dax-private.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-10-29 15:52:42 -0700
committerDan Williams <dan.j.williams@intel.com>2019-01-06 21:26:21 -0800
commit89ec9f2cfa36cc5fca2fb445ed221bb9add7b536 (patch)
tree1306755d2ecae784ddee3df710c16c4cfeaff771 /drivers/dax/dax-private.h
parent9567da0b408a2553d32ca83cba4f1fc5a8aad459 (diff)
downloadlinux-89ec9f2cfa36cc5fca2fb445ed221bb9add7b536.tar.bz2
device-dax: Move resource pinning+mapping into the common driver
Move the responsibility of calling devm_request_resource() and devm_memremap_pages() into the common device-dax driver. This is another preparatory step to allowing an alternate personality driver for a device-dax range. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dax/dax-private.h')
-rw-r--r--drivers/dax/dax-private.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/dax/dax-private.h b/drivers/dax/dax-private.h
index c3a121700837..a82ce48f5884 100644
--- a/drivers/dax/dax-private.h
+++ b/drivers/dax/dax-private.h
@@ -42,15 +42,22 @@ struct dax_region {
};
/**
- * struct dev_dax - instance data for a subdivision of a dax region
+ * struct dev_dax - instance data for a subdivision of a dax region, and
+ * data while the device is activated in the driver.
* @region - parent region
* @dax_dev - core dax functionality
* @dev - device core
+ * @pgmap - pgmap for memmap setup / lifetime (driver owned)
+ * @ref: pgmap reference count (driver owned)
+ * @cmp: @ref final put completion (driver owned)
*/
struct dev_dax {
struct dax_region *region;
struct dax_device *dax_dev;
struct device dev;
+ struct dev_pagemap pgmap;
+ struct percpu_ref ref;
+ struct completion cmp;
};
static inline struct dev_dax *to_dev_dax(struct device *dev)