Lines Matching refs:ndd

298 	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
442 for_each_dpa_resource(ndd, res) in scan_allocate()
451 for_each_dpa_resource(ndd, res) { in scan_allocate()
468 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
479 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
490 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
534 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
549 nd_dbg_dpa(nd_region, ndd, new_res, "%s(%d) %d\n", in scan_allocate()
577 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa() local
583 for_each_dpa_resource(ndd, res) { in merge_dpa()
593 nvdimm_free_dpa(ndd, next); in merge_dpa()
595 nd_dbg_dpa(nd_region, ndd, res, "merge %d\n", rc); in merge_dpa()
645 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem() local
648 for_each_dpa_resource_safe(ndd, res, _res) in release_free_pmem()
650 nvdimm_free_dpa(ndd, res); in release_free_pmem()
705 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_pmem_set_resource() local
709 if (!ndd) { in nd_namespace_pmem_set_resource()
717 for_each_dpa_resource(ndd, res) in nd_namespace_pmem_set_resource()
749 struct nvdimm_drvdata *ndd; in __size_store() local
786 ndd = to_ndd(nd_mapping); in __size_store()
792 if (!ndd) in __size_store()
795 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
993 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid() local
997 for_each_dpa_resource(ndd, res) in namespace_update_uuid()
1010 nsl_get_uuid(ndd, nd_label, &uuid); in namespace_update_uuid()
1012 nsl_get_flags(ndd, nd_label)); in namespace_update_uuid()
1154 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show() local
1157 for_each_dpa_resource(ndd, res) in dpa_extents_show()
1175 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in btt_claim_class() local
1182 if (!ndd) { in btt_claim_class()
1187 nsindex = to_namespace_index(ndd, ndd->ns_current); in btt_claim_class()
1563 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in has_uuid_at_pos() local
1573 position = nsl_get_position(ndd, nd_label); in has_uuid_at_pos()
1575 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) in has_uuid_at_pos()
1578 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in has_uuid_at_pos()
1581 if (!nsl_validate_type_guid(ndd, nd_label, in has_uuid_at_pos()
1586 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1590 if (!nsl_validate_nlabel(nd_region, ndd, nd_label)) in has_uuid_at_pos()
1612 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in select_pmem_id() local
1622 if (nsl_uuid_equal(ndd, nd_label, pmem_id)) in select_pmem_id()
1638 pmem_start = nsl_get_dpa(ndd, nd_label); in select_pmem_id()
1639 pmem_end = pmem_start + nsl_get_rawsize(ndd, nd_label); in select_pmem_id()
1645 dev_name(ndd->dev), in select_pmem_id()
1646 nsl_uuid_raw(ndd, nd_label)); in select_pmem_id()
1666 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in create_namespace_pmem() local
1668 to_namespace_index(ndd, ndd->ns_current); in create_namespace_pmem()
1685 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) { in create_namespace_pmem()
1687 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1688 if (!nsl_validate_isetcookie(ndd, nd_label, altcookie)) in create_namespace_pmem()
1692 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1708 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1725 nvdimm_name(nvdimm), nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1735 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1743 struct nvdimm_drvdata *ndd; in create_namespace_pmem() local
1755 ndd = to_ndd(nd_mapping); in create_namespace_pmem()
1756 size += nsl_get_rawsize(ndd, label0); in create_namespace_pmem()
1757 if (nsl_get_position(ndd, label0) != 0) in create_namespace_pmem()
1760 nspm->alt_name = kmemdup(nsl_ref_name(ndd, label0), in create_namespace_pmem()
1762 nsl_get_uuid(ndd, label0, &uuid); in create_namespace_pmem()
1764 nspm->lbasize = nsl_get_lbasize(ndd, label0); in create_namespace_pmem()
1766 nsl_get_claim_class(ndd, label0); in create_namespace_pmem()
1890 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in add_namespace_resource() local
1901 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in add_namespace_resource()
1933 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_labels() local
1945 if (nsl_get_dpa(ndd, nd_label) < nd_mapping->start || in scan_labels()
1946 nsl_get_dpa(ndd, nd_label) > map_end) in scan_labels()
2071 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in deactivate_labels() local
2078 put_ndd(ndd); in deactivate_labels()
2079 nd_mapping->ndd = NULL; in deactivate_labels()
2080 if (ndd) in deactivate_labels()
2091 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels() local
2100 if (!ndd) { in init_active_labels()
2115 nd_mapping->ndd = ndd; in init_active_labels()
2117 get_ndd(ndd); in init_active_labels()
2119 count = nd_label_active_count(ndd); in init_active_labels()
2120 dev_dbg(ndd->dev, "count: %d\n", count); in init_active_labels()
2129 label = nd_label_active(ndd, j); in init_active_labels()