aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvdimm/nd-core.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2015-06-25 04:20:04 -0400
committerDan Williams <dan.j.williams@intel.com>2015-06-25 04:20:04 -0400
commit8c2f7e8658df1d3b7cbfa62706941d14c715823a (patch)
treeac93512841113f4d1d7a38d788ec73bb21e2d605 /drivers/nvdimm/nd-core.h
parent0ba1c634892b3590779803a701bcb82e8c32cc7a (diff)
libnvdimm: infrastructure for btt devices
NVDIMM namespaces, in addition to accepting "struct bio" based requests, also have the capability to perform byte-aligned accesses. By default only the bio/block interface is used. However, if another driver can make effective use of the byte-aligned capability it can claim namespace interface and use the byte-aligned ->rw_bytes() interface. The BTT driver is the initial first consumer of this mechanism to allow adding atomic sector update semantics to a pmem or blk namespace. This patch is the sysfs infrastructure to allow configuring a BTT instance for a namespace. Enabling that BTT and performing i/o is in a subsequent patch. Cc: Greg KH <gregkh@linuxfoundation.org> Cc: Neil Brown <neilb@suse.de> 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index 78d6c51f4bac..5e6413964776 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -45,12 +45,14 @@ struct nvdimm {
45bool is_nvdimm(struct device *dev); 45bool is_nvdimm(struct device *dev);
46bool is_nd_blk(struct device *dev); 46bool is_nd_blk(struct device *dev);
47bool is_nd_pmem(struct device *dev); 47bool is_nd_pmem(struct device *dev);
48struct nd_btt;
48struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev); 49struct nvdimm_bus *walk_to_nvdimm_bus(struct device *nd_dev);
49int __init nvdimm_bus_init(void); 50int __init nvdimm_bus_init(void);
50void nvdimm_bus_exit(void); 51void nvdimm_bus_exit(void);
51void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev); 52void nd_region_probe_success(struct nvdimm_bus *nvdimm_bus, struct device *dev);
52struct nd_region; 53struct nd_region;
53void nd_region_create_blk_seed(struct nd_region *nd_region); 54void nd_region_create_blk_seed(struct nd_region *nd_region);
55void nd_region_create_btt_seed(struct nd_region *nd_region);
54void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev); 56void nd_region_disable(struct nvdimm_bus *nvdimm_bus, struct device *dev);
55int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus); 57int nvdimm_bus_create_ndctl(struct nvdimm_bus *nvdimm_bus);
56void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus); 58void nvdimm_bus_destroy_ndctl(struct nvdimm_bus *nvdimm_bus);
@@ -58,6 +60,7 @@ void nd_synchronize(void);
58int nvdimm_bus_register_dimms(struct nvdimm_bus *nvdimm_bus); 60int nvdimm_bus_register_dimms(struct nvdimm_bus *nvdimm_bus);
59int nvdimm_bus_register_regions(struct nvdimm_bus *nvdimm_bus); 61int nvdimm_bus_register_regions(struct nvdimm_bus *nvdimm_bus);
60int nvdimm_bus_init_interleave_sets(struct nvdimm_bus *nvdimm_bus); 62int nvdimm_bus_init_interleave_sets(struct nvdimm_bus *nvdimm_bus);
63void __nd_device_register(struct device *dev);
61int nd_match_dimm(struct device *dev, void *data); 64int nd_match_dimm(struct device *dev, void *data);
62struct nd_label_id; 65struct nd_label_id;
63char *nd_label_gen_id(struct nd_label_id *label_id, u8 *uuid, u32 flags); 66char *nd_label_gen_id(struct nd_label_id *label_id, u8 *uuid, u32 flags);
@@ -77,4 +80,5 @@ struct resource *nsblk_add_resource(struct nd_region *nd_region,
77 resource_size_t start); 80 resource_size_t start);
78int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); 81int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd);
79void get_ndd(struct nvdimm_drvdata *ndd); 82void get_ndd(struct nvdimm_drvdata *ndd);
83resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
80#endif /* __ND_CORE_H__ */ 84#endif /* __ND_CORE_H__ */