Searched refs:ndd (Results 1 – 8 of 8) sorted by relevance
/kernel/linux/linux-5.10/drivers/nvdimm/ |
D | label.c | 37 unsigned sizeof_namespace_label(struct nvdimm_drvdata *ndd) in sizeof_namespace_label() argument 39 return ndd->nslabel_size; in sizeof_namespace_label() 48 static int __nvdimm_num_label_slots(struct nvdimm_drvdata *ndd, in __nvdimm_num_label_slots() argument 51 return (ndd->nsarea.config_size - index_size * 2) / in __nvdimm_num_label_slots() 52 sizeof_namespace_label(ndd); in __nvdimm_num_label_slots() 55 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd) in nvdimm_num_label_slots() argument 59 tmp_nslot = ndd->nsarea.config_size / sizeof_namespace_label(ndd); in nvdimm_num_label_slots() 62 return __nvdimm_num_label_slots(ndd, NSINDEX_ALIGN * n); in nvdimm_num_label_slots() 65 size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd) in sizeof_namespace_index() argument 75 nslot = nvdimm_num_label_slots(ndd); in sizeof_namespace_index() [all …]
|
D | dimm.c | 18 struct nvdimm_drvdata *ndd; in nvdimm_probe() local 42 ndd = kzalloc(sizeof(*ndd), GFP_KERNEL); in nvdimm_probe() 43 if (!ndd) in nvdimm_probe() 46 dev_set_drvdata(dev, ndd); in nvdimm_probe() 47 ndd->dpa.name = dev_name(dev); in nvdimm_probe() 48 ndd->ns_current = -1; in nvdimm_probe() 49 ndd->ns_next = -1; in nvdimm_probe() 50 ndd->dpa.start = 0; in nvdimm_probe() 51 ndd->dpa.end = -1; in nvdimm_probe() 52 ndd->dev = dev; in nvdimm_probe() [all …]
|
D | dimm_devs.c | 44 static int validate_dimm(struct nvdimm_drvdata *ndd) in validate_dimm() argument 48 if (!ndd) in validate_dimm() 51 rc = nvdimm_check_config_data(ndd->dev); in validate_dimm() 53 dev_dbg(ndd->dev, "%ps: %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() 67 int rc = validate_dimm(ndd); in nvdimm_init_nsarea() 78 rc = nd_desc->ndctl(nd_desc, to_nvdimm(ndd->dev), in nvdimm_init_nsarea() 85 int nvdimm_get_config_data(struct nvdimm_drvdata *ndd, void *buf, in nvdimm_get_config_data() argument [all …]
|
D | nd.h | 64 struct nvdimm_drvdata *ndd, int i) in to_namespace_index() argument 69 return ndd->data + sizeof_namespace_index(ndd) * i; in to_namespace_index() 73 struct nvdimm_drvdata *ndd) in to_current_namespace_index() argument 75 return to_namespace_index(ndd, ndd->ns_current); in to_current_namespace_index() 79 struct nvdimm_drvdata *ndd) in to_next_namespace_index() argument 81 return to_namespace_index(ndd, ndd->ns_next); in to_next_namespace_index() 84 unsigned sizeof_namespace_label(struct nvdimm_drvdata *ndd); 86 #define namespace_label_has(ndd, field) \ argument 88 < sizeof_namespace_label(ndd)) 96 #define for_each_dpa_resource(ndd, res) \ argument [all …]
|
D | label.h | 131 int nd_label_data_init(struct nvdimm_drvdata *ndd); 132 size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd); 133 int nd_label_active_count(struct nvdimm_drvdata *ndd); 134 struct nd_namespace_label *nd_label_active(struct nvdimm_drvdata *ndd, int n); 135 u32 nd_label_alloc_slot(struct nvdimm_drvdata *ndd); 136 bool nd_label_free_slot(struct nvdimm_drvdata *ndd, u32 slot); 137 u32 nd_label_nfree(struct nvdimm_drvdata *ndd);
|
D | namespace_devs.c | 273 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_blk_size() local 281 for_each_dpa_resource(ndd, res) in nd_namespace_blk_size() 291 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in __nd_namespace_blk_validate() local 296 if (!nsblk->uuid || !nsblk->lbasize || !ndd) in __nd_namespace_blk_validate() 301 for_each_dpa_resource(ndd, res) { in __nd_namespace_blk_validate() 320 for_each_dpa_resource(ndd, res) in __nd_namespace_blk_validate() 426 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free() local 434 for_each_dpa_resource(ndd, res) in scan_free() 443 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free() 444 nvdimm_free_dpa(ndd, res); in scan_free() [all …]
|
D | nd-core.h | 149 resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd, 153 struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk, 155 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd); 156 void get_ndd(struct nvdimm_drvdata *ndd);
|
D | region_devs.c | 313 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in set_cookie_show() local 315 if (ndd) { in set_cookie_show() 318 nsindex = to_namespace_index(ndd, ndd->ns_current); in set_cookie_show() 345 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_region_available_dpa() local 348 if (!ndd) in nd_region_available_dpa()
|