Lines Matching refs:ndd

300 	struct nvdimm_drvdata *ndd = to_ndd(nd_mapping);  in scan_free()  local
307 for_each_dpa_resource(ndd, res) in scan_free()
316 nd_dbg_dpa(nd_region, ndd, res, "delete %d\n", rc); in scan_free()
317 nvdimm_free_dpa(ndd, res); in scan_free()
325 nd_dbg_dpa(nd_region, ndd, res, "shrink %d\n", rc); in scan_free()
366 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation() local
371 res = nvdimm_allocate_dpa(ndd, label_id, nd_mapping->start, n); in init_dpa_allocation()
375 nd_dbg_dpa(nd_region, ndd, res, "init %d\n", rc); in init_dpa_allocation()
396 static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, in space_valid() argument
441 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate() local
446 for_each_dpa_resource(ndd, res) in scan_allocate()
455 for_each_dpa_resource(ndd, res) { in scan_allocate()
472 space_valid(nd_region, ndd, label_id, NULL, next, exist, in scan_allocate()
483 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
494 space_valid(nd_region, ndd, label_id, res, next, exist, in scan_allocate()
538 new_res = nvdimm_allocate_dpa(ndd, label_id, in scan_allocate()
553 nd_dbg_dpa(nd_region, ndd, new_res, "%s(%d) %d\n", in scan_allocate()
581 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa() local
587 for_each_dpa_resource(ndd, res) { in merge_dpa()
597 nvdimm_free_dpa(ndd, next); in merge_dpa()
599 nd_dbg_dpa(nd_region, ndd, res, "merge %d\n", rc); in merge_dpa()
649 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem() local
652 for_each_dpa_resource_safe(ndd, res, _res) in release_free_pmem()
654 nvdimm_free_dpa(ndd, res); in release_free_pmem()
711 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_pmem_set_resource() local
715 if (!ndd) { in nd_namespace_pmem_set_resource()
723 for_each_dpa_resource(ndd, res) in nd_namespace_pmem_set_resource()
755 struct nvdimm_drvdata *ndd; in __size_store() local
792 ndd = to_ndd(nd_mapping); in __size_store()
798 if (!ndd) in __size_store()
801 allocated += nvdimm_allocated_dpa(ndd, &label_id); in __size_store()
1001 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid() local
1005 for_each_dpa_resource(ndd, res) in namespace_update_uuid()
1018 nsl_get_uuid(ndd, nd_label, &uuid); in namespace_update_uuid()
1020 nsl_get_flags(ndd, nd_label)); in namespace_update_uuid()
1162 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show() local
1165 for_each_dpa_resource(ndd, res) in dpa_extents_show()
1183 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in btt_claim_class() local
1190 if (!ndd) { in btt_claim_class()
1195 nsindex = to_namespace_index(ndd, ndd->ns_current); in btt_claim_class()
1571 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in has_uuid_at_pos() local
1581 position = nsl_get_position(ndd, nd_label); in has_uuid_at_pos()
1583 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) in has_uuid_at_pos()
1586 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in has_uuid_at_pos()
1589 if (!nsl_validate_type_guid(ndd, nd_label, in has_uuid_at_pos()
1594 dev_dbg(ndd->dev, "duplicate entry for uuid\n"); in has_uuid_at_pos()
1598 if (!nsl_validate_nlabel(nd_region, ndd, nd_label)) in has_uuid_at_pos()
1617 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in select_pmem_id() local
1627 if (nsl_uuid_equal(ndd, nd_label, pmem_id)) in select_pmem_id()
1643 pmem_start = nsl_get_dpa(ndd, nd_label); in select_pmem_id()
1644 pmem_end = pmem_start + nsl_get_rawsize(ndd, nd_label); in select_pmem_id()
1650 dev_name(ndd->dev), in select_pmem_id()
1651 nsl_uuid_raw(ndd, nd_label)); in select_pmem_id()
1673 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in create_namespace_pmem() local
1675 to_namespace_index(ndd, ndd->ns_current); in create_namespace_pmem()
1692 if (!nsl_validate_isetcookie(ndd, nd_label, cookie)) { in create_namespace_pmem()
1694 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1695 if (!nsl_validate_isetcookie(ndd, nd_label, altcookie)) in create_namespace_pmem()
1699 nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1715 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1732 nvdimm_name(nvdimm), nsl_uuid_raw(ndd, nd_label)); in create_namespace_pmem()
1742 nsl_get_uuid(ndd, nd_label, &uuid); in create_namespace_pmem()
1750 struct nvdimm_drvdata *ndd; in create_namespace_pmem() local
1762 ndd = to_ndd(nd_mapping); in create_namespace_pmem()
1763 size += nsl_get_rawsize(ndd, label0); in create_namespace_pmem()
1764 if (nsl_get_position(ndd, label0) != 0) in create_namespace_pmem()
1767 nspm->alt_name = kmemdup(nsl_ref_name(ndd, label0), in create_namespace_pmem()
1769 nsl_get_uuid(ndd, label0, &uuid); in create_namespace_pmem()
1771 nspm->lbasize = nsl_get_lbasize(ndd, label0); in create_namespace_pmem()
1773 nsl_get_claim_class(ndd, label0); in create_namespace_pmem()
1894 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in add_namespace_resource() local
1905 if (!nsl_uuid_equal(ndd, nd_label, uuid)) in add_namespace_resource()
1937 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_labels() local
1953 if (nsl_get_dpa(ndd, nd_label) < nd_mapping->start || in scan_labels()
1954 nsl_get_dpa(ndd, nd_label) > map_end) in scan_labels()
2072 struct nvdimm_drvdata *ndd = nd_mapping->ndd; in deactivate_labels() local
2079 put_ndd(ndd); in deactivate_labels()
2080 nd_mapping->ndd = NULL; in deactivate_labels()
2081 if (ndd) in deactivate_labels()
2092 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels() local
2101 if (!ndd) { in init_active_labels()
2116 nd_mapping->ndd = ndd; in init_active_labels()
2118 get_ndd(ndd); in init_active_labels()
2120 count = nd_label_active_count(ndd); in init_active_labels()
2121 dev_dbg(ndd->dev, "count: %d\n", count); in init_active_labels()
2130 label = nd_label_active(ndd, j); in init_active_labels()