diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-06-07 17:00:04 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-07-11 15:09:26 -0700 |
commit | e5ae3b252c6732f838f5695170bbf2ea9fb5b9ff (patch) | |
tree | 33db4ea36acf0b1fe329e592b4cac6c266dfa7f5 /drivers/nvdimm/nd.h | |
parent | a8a6d2e04c4ffda055db70814c50bd106e44730f (diff) |
libnvdimm, nfit: move flush hint mapping to region-device driver-data
In preparation for triggering flushes of a DIMM's writes-posted-queue
(WPQ) via the pmem driver move mapping of flush hint addresses to the
region driver. Since this uses devm_nvdimm_memremap() the flush
addresses will remain mapped while any region to which the dimm belongs
is active.
We need to communicate more information to the nvdimm core to facilitate
this mapping, namely each dimm object now carries an array of flush hint
address resources.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r-- | drivers/nvdimm/nd.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index 2819e886dfd2..5912bd6b4234 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -49,9 +49,10 @@ struct nvdimm_drvdata { struct kref kref; }; -struct nd_region_namespaces { - int count; - int active; +struct nd_region_data { + int ns_count; + int ns_active; + void __iomem *flush_wpq[0][0]; }; static inline struct nd_namespace_index *to_namespace_index( @@ -324,6 +325,7 @@ static inline void devm_nsio_disable(struct device *dev, } #endif int nd_blk_region_init(struct nd_region *nd_region); +int nd_region_activate(struct nd_region *nd_region); void __nd_iostat_start(struct bio *bio, unsigned long *start); static inline bool nd_iostat_start(struct bio *bio, unsigned long *start) { |