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()
364 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation() local
369 res = nvdimm_allocate_dpa(ndd, label_id, nd_mapping->start, n); in init_dpa_allocation()
373 nd_dbg_dpa(nd_region, ndd, res, "init %d\n", rc); in init_dpa_allocation()
394 static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, in space_valid() argument
439 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate() local
444 for_each_dpa_resource(ndd, res) in scan_allocate()
453 for_each_dpa_resource(ndd, res) { in scan_allocate()
470 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
481 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
492 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
536 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
551 nd_dbg_dpa(nd_region, ndd, new_res, "%s(%d) %d\n", in scan_allocate()
579 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa() local
585 for_each_dpa_resource(ndd, res) { in merge_dpa()
595 nvdimm_free_dpa(ndd, next); in merge_dpa()
597 nd_dbg_dpa(nd_region, ndd, res, "merge %d\n", rc); in merge_dpa()
647 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem() local
650 for_each_dpa_resource_safe(ndd, res, _res) in release_free_pmem()
652 nvdimm_free_dpa(ndd, res); in release_free_pmem()
709 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_pmem_set_resource() local
713 if (!ndd) { in nd_namespace_pmem_set_resource()
721 for_each_dpa_resource(ndd, res) in nd_namespace_pmem_set_resource()
753 struct nvdimm_drvdata *ndd; in __size_store() local
790 ndd = to_ndd(nd_mapping); in __size_store()
796 if (!ndd) in __size_store()
799 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
991 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid() local
995 for_each_dpa_resource(ndd, res) in namespace_update_uuid()
1008 nsl_get_uuid(ndd, nd_label, &uuid); in namespace_update_uuid()
1010 nsl_get_flags(ndd, nd_label)); in namespace_update_uuid()
1160 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show() local
1163 for_each_dpa_resource(ndd, res) in dpa_extents_show()
1179 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in btt_claim_class() local
1186 if (!ndd) { in btt_claim_class()
1191 nsindex = to_namespace_index(ndd, ndd->ns_current); in btt_claim_class()
1565 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in has_uuid_at_pos() local
1575 position = nsl_get_position(ndd, nd_label); in has_uuid_at_pos()
1577 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) in has_uuid_at_pos()
1580 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in has_uuid_at_pos()
1583 if (!nsl_validate_type_guid(ndd, nd_label, in has_uuid_at_pos()
1588 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1592 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()
1667 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in create_namespace_pmem() local
1669 to_namespace_index(ndd, ndd->ns_current); in create_namespace_pmem()
1686 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) { in create_namespace_pmem()
1688 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1689 if (!nsl_validate_isetcookie(ndd, nd_label, altcookie)) in create_namespace_pmem()
1693 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1709 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1726 nvdimm_name(nvdimm), nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1736 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1744 struct nvdimm_drvdata *ndd; in create_namespace_pmem() local
1756 ndd = to_ndd(nd_mapping); in create_namespace_pmem()
1757 size += nsl_get_rawsize(ndd, label0); in create_namespace_pmem()
1758 if (nsl_get_position(ndd, label0) != 0) in create_namespace_pmem()
1761 nspm->alt_name = kmemdup(nsl_ref_name(ndd, label0), in create_namespace_pmem()
1763 nsl_get_uuid(ndd, label0, &uuid); in create_namespace_pmem()
1765 nspm->lbasize = nsl_get_lbasize(ndd, label0); in create_namespace_pmem()
1767 nsl_get_claim_class(ndd, label0); in create_namespace_pmem()
1888 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in add_namespace_resource() local
1899 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in add_namespace_resource()
1931 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_labels() local
1947 if (nsl_get_dpa(ndd, nd_label) < nd_mapping->start || in scan_labels()
1948 nsl_get_dpa(ndd, nd_label) > map_end) in scan_labels()
2066 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in deactivate_labels() local
2073 put_ndd(ndd); in deactivate_labels()
2074 nd_mapping->ndd = NULL; in deactivate_labels()
2075 if (ndd) in deactivate_labels()
2086 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels() local
2095 if (!ndd) { in init_active_labels()
2110 nd_mapping->ndd = ndd; in init_active_labels()
2112 get_ndd(ndd); in init_active_labels()
2114 count = nd_label_active_count(ndd); in init_active_labels()
2115 dev_dbg(ndd->dev, "count: %d\n", count); in init_active_labels()
2124 label = nd_label_active(ndd, j); in init_active_labels()