Home
last modified time | relevance | path

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

/linux-6.6.21/drivers/nvdimm/
Dlabel.c45 unsigned sizeof_namespace_label(struct nvdimm_drvdata *ndd) in sizeof_namespace_label() argument
47 return ndd->nslabel_size; in sizeof_namespace_label()
56 static int __nvdimm_num_label_slots(struct nvdimm_drvdata *ndd, in __nvdimm_num_label_slots() argument
59 return (ndd->nsarea.config_size - index_size * 2) / in __nvdimm_num_label_slots()
60 sizeof_namespace_label(ndd); in __nvdimm_num_label_slots()
63 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd) in nvdimm_num_label_slots() argument
67 tmp_nslot = ndd->nsarea.config_size / sizeof_namespace_label(ndd); in nvdimm_num_label_slots()
70 return __nvdimm_num_label_slots(ndd, NSINDEX_ALIGN * n); in nvdimm_num_label_slots()
73 size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd) in sizeof_namespace_index() argument
83 nslot = nvdimm_num_label_slots(ndd); in sizeof_namespace_index()
[all …]
Dnd.h39 static inline const u8 *nsl_ref_name(struct nvdimm_drvdata *ndd, in nsl_ref_name() argument
42 if (ndd->cxl) in nsl_ref_name()
47 static inline u8 *nsl_get_name(struct nvdimm_drvdata *ndd, in nsl_get_name() argument
50 if (ndd->cxl) in nsl_get_name()
55 static inline u8 *nsl_set_name(struct nvdimm_drvdata *ndd, in nsl_set_name() argument
60 if (ndd->cxl) in nsl_set_name()
65 static inline u32 nsl_get_slot(struct nvdimm_drvdata *ndd, in nsl_get_slot() argument
68 if (ndd->cxl) in nsl_get_slot()
73 static inline void nsl_set_slot(struct nvdimm_drvdata *ndd, in nsl_set_slot() argument
76 if (ndd->cxl) in nsl_set_slot()
[all …]
Ddimm.c18 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 …]
Ddimm_devs.c40 static int validate_dimm(struct nvdimm_drvdata *ndd) in validate_dimm() argument
44 if (!ndd) in validate_dimm()
47 rc = nvdimm_check_config_data(ndd->dev); in validate_dimm()
49 dev_dbg(ndd->dev, "%ps: %s error: %d\n", in validate_dimm()
58 int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd) in nvdimm_init_nsarea() argument
60 struct nd_cmd_get_config_size *cmd = &ndd->nsarea; in nvdimm_init_nsarea()
61 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(ndd->dev); in nvdimm_init_nsarea()
63 int rc = validate_dimm(ndd); in nvdimm_init_nsarea()
74 rc = nd_desc->ndctl(nd_desc, to_nvdimm(ndd->dev), in nvdimm_init_nsarea()
81 int nvdimm_get_config_data(struct nvdimm_drvdata *ndd, void *buf, in nvdimm_get_config_data() argument
[all …]
Dnamespace_devs.c298 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free() local
305 for_each_dpa_resource(ndd, res) in scan_free()
314 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free()
315 nvdimm_free_dpa(ndd, res); in scan_free()
323 nd_dbg_dpa(nd_region, ndd, res, "shrink %d\n", rc); in scan_free()
362 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation() local
367 res = nvdimm_allocate_dpa(ndd, label_id, nd_mapping->start, n); in init_dpa_allocation()
371 nd_dbg_dpa(nd_region, ndd, res, "init %d\n", rc); in init_dpa_allocation()
392 static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, in space_valid() argument
437 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate() local
[all …]
Dlabel.h215 int nd_label_data_init(struct nvdimm_drvdata *ndd);
216 size_t sizeof_namespace_index(struct nvdimm_drvdata *ndd);
217 int nd_label_active_count(struct nvdimm_drvdata *ndd);
218 struct nd_namespace_label *nd_label_active(struct nvdimm_drvdata *ndd, int n);
219 u32 nd_label_alloc_slot(struct nvdimm_drvdata *ndd);
220 bool nd_label_free_slot(struct nvdimm_drvdata *ndd, u32 slot);
221 u32 nd_label_nfree(struct nvdimm_drvdata *ndd);
Dnd-core.h132 resource_size_t nvdimm_allocated_dpa(struct nvdimm_drvdata *ndd,
134 int nvdimm_num_label_slots(struct nvdimm_drvdata *ndd);
135 void get_ndd(struct nvdimm_drvdata *ndd);
Dregion_devs.c335 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in set_cookie_show() local
337 if (ndd) { in set_cookie_show()
340 nsindex = to_namespace_index(ndd, ndd->ns_current); in set_cookie_show()
365 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_region_available_dpa() local
368 if (!ndd) in nd_region_available_dpa()