diff options
author | Dan Williams <dan.j.williams@intel.com> | 2015-07-30 17:57:47 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-08-28 23:39:36 -0400 |
commit | e1455744b27c9e6115c3508a7b2902157c2c4347 (patch) | |
tree | 6bfbc5d78269c9389f5bcfc1adc35d4f7f2e6fa4 /drivers/nvdimm/nd-core.h | |
parent | 96601adb745186ccbcf5b078d4756f13381ec2af (diff) |
libnvdimm, pfn: 'struct page' provider infrastructure
Implement the base infrastructure for libnvdimm PFN devices. Similar to
BTT devices they take a namespace as a backing device and layer
functionality on top. In this case the functionality is reserving space
for an array of 'struct page' entries to be handed out through
pfn_to_page(). For now this is just the basic libnvdimm-device-model for
configuring the base PFN device.
As the namespace claiming mechanism for PFN devices is mostly identical
to BTT devices drivers/nvdimm/claim.c is created to house the common
bits.
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd-core.h')
-rw-r--r-- | drivers/nvdimm/nd-core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h index e1970c71ad1c..159aed532042 100644 --- a/drivers/nvdimm/nd-core.h +++ b/drivers/nvdimm/nd-core.h | |||
@@ -80,4 +80,13 @@ struct resource *nsblk_add_resource(struct nd_region *nd_region, | |||
80 | int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); | 80 | int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); |
81 | void get_ndd(struct nvdimm_drvdata *ndd); | 81 | void get_ndd(struct nvdimm_drvdata *ndd); |
82 | resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns); | 82 | resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns); |
83 | void nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns); | ||
84 | void __nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns); | ||
85 | bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, | ||
86 | struct nd_namespace_common **_ndns); | ||
87 | bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, | ||
88 | struct nd_namespace_common **_ndns); | ||
89 | ssize_t nd_namespace_store(struct device *dev, | ||
90 | struct nd_namespace_common **_ndns, const char *buf, | ||
91 | size_t len); | ||
83 | #endif /* __ND_CORE_H__ */ | 92 | #endif /* __ND_CORE_H__ */ |