Home
last modified time | relevance | path

Searched refs:ndd (Results 1 – 8 of 8) sorted by relevance

/drivers/nvdimm/
Dlabel.c37 size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd) in sizeof_namespace_index() argument
41 if (ndd->nsindex_size) in sizeof_namespace_index()
42 return ndd->nsindex_size; in sizeof_namespace_index()
52 index_span = ndd->nsarea.config_size / 129; in sizeof_namespace_index()
54 ndd->nsindex_size = index_span * NSINDEX_ALIGN; in sizeof_namespace_index()
56 return ndd->nsindex_size; in sizeof_namespace_index()
59 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd) in nvdimm_num_label_slots() argument
61 return ndd->nsarea.config_size / 129; in nvdimm_num_label_slots()
64 int nd_label_validate(struct nvdimm_drvdata *ndd) in nd_label_validate() argument
94 to_namespace_index(ndd, 0), in nd_label_validate()
[all …]
Ddimm.c26 struct nvdimm_drvdata *ndd; in nvdimm_probe() local
37 ndd = kzalloc(sizeof(*ndd), GFP_KERNEL); in nvdimm_probe()
38 if (!ndd) in nvdimm_probe()
41 dev_set_drvdata(dev, ndd); in nvdimm_probe()
42 ndd->dpa.name = dev_name(dev); in nvdimm_probe()
43 ndd->ns_current = -1; in nvdimm_probe()
44 ndd->ns_next = -1; in nvdimm_probe()
45 ndd->dpa.start = 0; in nvdimm_probe()
46 ndd->dpa.end = -1; in nvdimm_probe()
47 ndd->dev = dev; in nvdimm_probe()
[all …]
Ddimm_devs.c46 static int validate_dimm(struct nvdimm_drvdata *ndd) in validate_dimm() argument
50 if (!ndd) in validate_dimm()
53 rc = nvdimm_check_config_data(ndd->dev); in validate_dimm()
55 dev_dbg(ndd->dev, "%pf: %s error: %d\n", in validate_dimm()
64 int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd) in nvdimm_init_nsarea() argument
66 struct nd_cmd_get_config_size *cmd = &ndd->nsarea; in nvdimm_init_nsarea()
67 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(ndd->dev); in nvdimm_init_nsarea()
69 int rc = validate_dimm(ndd); in nvdimm_init_nsarea()
79 return nd_desc->ndctl(nd_desc, to_nvdimm(ndd->dev), in nvdimm_init_nsarea()
83 int nvdimm_init_config_data(struct nvdimm_drvdata *ndd) in nvdimm_init_config_data() argument
[all …]
Dnd.h78 struct nvdimm_drvdata *ndd, int i) in to_namespace_index() argument
83 return ndd->data + sizeof_namespace_index(ndd) * i; in to_namespace_index()
87 struct nvdimm_drvdata *ndd) in to_current_namespace_index() argument
89 return to_namespace_index(ndd, ndd->ns_current); in to_current_namespace_index()
93 struct nvdimm_drvdata *ndd) in to_next_namespace_index() argument
95 return to_namespace_index(ndd, ndd->ns_next); in to_next_namespace_index()
104 #define for_each_dpa_resource(ndd, res) \ argument
105 for (res = (ndd)->dpa.child; res; res = res->sibling)
107 #define for_each_dpa_resource_safe(ndd, res, next) \ argument
108 for (res = (ndd)->dpa.child, next = res ? res->sibling : NULL; \
[all …]
Dlabel.h125 int nd_label_validate(struct nvdimm_drvdata *ndd);
126 void nd_label_copy(struct nvdimm_drvdata *ndd, struct nd_namespace_index *dst,
128 size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd);
129 int nd_label_active_count(struct nvdimm_drvdata *ndd);
130 struct nd_namespace_label *nd_label_active(struct nvdimm_drvdata *ndd, int n);
131 u32 nd_label_alloc_slot(struct nvdimm_drvdata *ndd);
132 bool nd_label_free_slot(struct nvdimm_drvdata *ndd, u32 slot);
133 u32 nd_label_nfree(struct nvdimm_drvdata *ndd);
Dnamespace_devs.c284 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_blk_size() local
292 for_each_dpa_resource(ndd, res) in nd_namespace_blk_size()
302 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in __nd_namespace_blk_validate() local
307 if (!nsblk->uuid || !nsblk->lbasize || !ndd) in __nd_namespace_blk_validate()
312 for_each_dpa_resource(ndd, res) { in __nd_namespace_blk_validate()
331 for_each_dpa_resource(ndd, res) in __nd_namespace_blk_validate()
437 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free() local
445 for_each_dpa_resource(ndd, res) in scan_free()
454 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free()
455 nvdimm_free_dpa(ndd, res); in scan_free()
[all …]
Dnd-core.h98 resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd,
102 struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk,
104 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd);
105 void get_ndd(struct nvdimm_drvdata *ndd);
Dregion_devs.c303 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_region_available_dpa() local
306 if (!ndd) in nd_region_available_dpa()
545 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in nd_region_notify_driver_action() local
552 put_ndd(ndd); in nd_region_notify_driver_action()
553 nd_mapping->ndd = NULL; in nd_region_notify_driver_action()
554 if (ndd) in nd_region_notify_driver_action()