Searched refs:ndd (Results 1 – 8 of 8) sorted by relevance
/drivers/nvdimm/ |
D | label.c | 37 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 …]
|
D | dimm.c | 26 struct nvdimm_drvdata *ndd; in nvdimm_probe() local 29 ndd = kzalloc(sizeof(*ndd), GFP_KERNEL); in nvdimm_probe() 30 if (!ndd) in nvdimm_probe() 33 dev_set_drvdata(dev, ndd); in nvdimm_probe() 34 ndd->dpa.name = dev_name(dev); in nvdimm_probe() 35 ndd->ns_current = -1; in nvdimm_probe() 36 ndd->ns_next = -1; in nvdimm_probe() 37 ndd->dpa.start = 0; in nvdimm_probe() 38 ndd->dpa.end = -1; in nvdimm_probe() 39 ndd->dev = dev; in nvdimm_probe() [all …]
|
D | dimm_devs.c | 31 static int __validate_dimm(struct nvdimm_drvdata *ndd) in __validate_dimm() argument 35 if (!ndd) in __validate_dimm() 38 nvdimm = to_nvdimm(ndd->dev); in __validate_dimm() 48 static int validate_dimm(struct nvdimm_drvdata *ndd) in validate_dimm() argument 50 int rc = __validate_dimm(ndd); in validate_dimm() 52 if (rc && ndd) in validate_dimm() 53 dev_dbg(ndd->dev, "%pf: %s error: %d\n", in validate_dimm() 62 int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd) in nvdimm_init_nsarea() argument 64 struct nd_cmd_get_config_size *cmd = &ndd->nsarea; in nvdimm_init_nsarea() 65 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(ndd->dev); in nvdimm_init_nsarea() [all …]
|
D | nd.h | 56 struct nvdimm_drvdata *ndd, int i) in to_namespace_index() argument 61 return ndd->data + sizeof_namespace_index(ndd) * i; in to_namespace_index() 65 struct nvdimm_drvdata *ndd) in to_current_namespace_index() argument 67 return to_namespace_index(ndd, ndd->ns_current); in to_current_namespace_index() 71 struct nvdimm_drvdata *ndd) in to_next_namespace_index() argument 73 return to_namespace_index(ndd, ndd->ns_next); in to_next_namespace_index() 85 #define for_each_dpa_resource(ndd, res) \ argument 86 for (res = (ndd)->dpa.child; res; res = res->sibling) 88 #define for_each_dpa_resource_safe(ndd, res, next) \ argument 89 for (res = (ndd)->dpa.child, next = res ? res->sibling : NULL; \ [all …]
|
D | label.h | 125 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);
|
D | namespace_devs.c | 268 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_blk_size() local 276 for_each_dpa_resource(ndd, res) in nd_namespace_blk_size() 286 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in __nd_namespace_blk_validate() local 291 if (!nsblk->uuid || !nsblk->lbasize || !ndd) in __nd_namespace_blk_validate() 296 for_each_dpa_resource(ndd, res) { in __nd_namespace_blk_validate() 315 for_each_dpa_resource(ndd, res) in __nd_namespace_blk_validate() 421 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free() local 429 for_each_dpa_resource(ndd, res) in scan_free() 438 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free() 439 nvdimm_free_dpa(ndd, res); in scan_free() [all …]
|
D | nd-core.h | 74 resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd, 78 struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk, 80 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); 81 void get_ndd(struct nvdimm_drvdata *ndd);
|
D | region_devs.c | 200 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_region_available_dpa() local 203 if (!ndd) in nd_region_available_dpa() 408 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in nd_region_notify_driver_action() local 413 put_ndd(ndd); in nd_region_notify_driver_action() 414 nd_mapping->ndd = NULL; in nd_region_notify_driver_action() 415 if (ndd) in nd_region_notify_driver_action()
|