Lines Matching refs:ndd

297 	struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);  in scan_free()  local
304 for_each_dpa_resource(ndd, res) in scan_free()
313 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free()
314 nvdimm_free_dpa(ndd, res); in scan_free()
322 nd_dbg_dpa(nd_region, ndd, res, "shrink %d\n", rc); in scan_free()
361 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation() local
366 res = nvdimm_allocate_dpa(ndd, label_id, nd_mapping->start, n); in init_dpa_allocation()
370 nd_dbg_dpa(nd_region, ndd, res, "init %d\n", rc); in init_dpa_allocation()
391 static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, in space_valid() argument
436 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate() local
441 for_each_dpa_resource(ndd, res) in scan_allocate()
450 for_each_dpa_resource(ndd, res) { in scan_allocate()
467 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
478 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
489 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
533 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
548 nd_dbg_dpa(nd_region, ndd, new_res, "%s(%d) %d\n", in scan_allocate()
576 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa() local
582 for_each_dpa_resource(ndd, res) { in merge_dpa()
592 nvdimm_free_dpa(ndd, next); in merge_dpa()
594 nd_dbg_dpa(nd_region, ndd, res, "merge %d\n", rc); in merge_dpa()
644 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem() local
647 for_each_dpa_resource_safe(ndd, res, _res) in release_free_pmem()
649 nvdimm_free_dpa(ndd, res); in release_free_pmem()
704 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_pmem_set_resource() local
708 if (!ndd) { in nd_namespace_pmem_set_resource()
716 for_each_dpa_resource(ndd, res) in nd_namespace_pmem_set_resource()
748 struct nvdimm_drvdata *ndd; in __size_store() local
785 ndd = to_ndd(nd_mapping); in __size_store()
791 if (!ndd) in __size_store()
794 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
992 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid() local
996 for_each_dpa_resource(ndd, res) in namespace_update_uuid()
1009 nsl_get_uuid(ndd, nd_label, &uuid); in namespace_update_uuid()
1011 nsl_get_flags(ndd, nd_label)); in namespace_update_uuid()
1153 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show() local
1156 for_each_dpa_resource(ndd, res) in dpa_extents_show()
1174 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in btt_claim_class() local
1181 if (!ndd) { in btt_claim_class()
1186 nsindex = to_namespace_index(ndd, ndd->ns_current); in btt_claim_class()
1562 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in has_uuid_at_pos() local
1572 position = nsl_get_position(ndd, nd_label); in has_uuid_at_pos()
1574 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) in has_uuid_at_pos()
1577 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in has_uuid_at_pos()
1580 if (!nsl_validate_type_guid(ndd, nd_label, in has_uuid_at_pos()
1585 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1589 if (!nsl_validate_nlabel(nd_region, ndd, nd_label)) in has_uuid_at_pos()
1611 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in select_pmem_id() local
1621 if (nsl_uuid_equal(ndd, nd_label, pmem_id)) in select_pmem_id()
1637 pmem_start = nsl_get_dpa(ndd, nd_label); in select_pmem_id()
1638 pmem_end = pmem_start + nsl_get_rawsize(ndd, nd_label); in select_pmem_id()
1644 dev_name(ndd->dev), in select_pmem_id()
1645 nsl_uuid_raw(ndd, nd_label)); in select_pmem_id()
1665 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in create_namespace_pmem() local
1667 to_namespace_index(ndd, ndd->ns_current); in create_namespace_pmem()
1684 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) { in create_namespace_pmem()
1686 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1687 if (!nsl_validate_isetcookie(ndd, nd_label, altcookie)) in create_namespace_pmem()
1691 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1707 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1724 nvdimm_name(nvdimm), nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1734 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1742 struct nvdimm_drvdata *ndd; in create_namespace_pmem() local
1754 ndd = to_ndd(nd_mapping); in create_namespace_pmem()
1755 size += nsl_get_rawsize(ndd, label0); in create_namespace_pmem()
1756 if (nsl_get_position(ndd, label0) != 0) in create_namespace_pmem()
1759 nspm->alt_name = kmemdup(nsl_ref_name(ndd, label0), in create_namespace_pmem()
1761 nsl_get_uuid(ndd, label0, &uuid); in create_namespace_pmem()
1763 nspm->lbasize = nsl_get_lbasize(ndd, label0); in create_namespace_pmem()
1765 nsl_get_claim_class(ndd, label0); in create_namespace_pmem()
1889 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in add_namespace_resource() local
1900 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in add_namespace_resource()
1932 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_labels() local
1944 if (nsl_get_dpa(ndd, nd_label) < nd_mapping->start || in scan_labels()
1945 nsl_get_dpa(ndd, nd_label) > map_end) in scan_labels()
2070 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in deactivate_labels() local
2077 put_ndd(ndd); in deactivate_labels()
2078 nd_mapping->ndd = NULL; in deactivate_labels()
2079 if (ndd) in deactivate_labels()
2090 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels() local
2099 if (!ndd) { in init_active_labels()
2114 nd_mapping->ndd = ndd; in init_active_labels()
2116 get_ndd(ndd); in init_active_labels()
2118 count = nd_label_active_count(ndd); in init_active_labels()
2119 dev_dbg(ndd->dev, "count: %d\n", count); in init_active_labels()
2128 label = nd_label_active(ndd, j); in init_active_labels()