Lines Matching refs:nd_mapping

267 	struct nd_mapping *nd_mapping = &nd_region->mapping[0];  in nd_namespace_blk_size()  local
268 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in nd_namespace_blk_size()
285 struct nd_mapping *nd_mapping = &nd_region->mapping[0]; in __nd_namespace_blk_validate() local
286 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in __nd_namespace_blk_validate()
417 struct nd_mapping *nd_mapping, struct nd_label_id *label_id, in scan_free() argument
421 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_free()
480 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in shrink_dpa_allocation() local
483 rc = scan_free(nd_region, nd_mapping, label_id, n); in shrink_dpa_allocation()
492 struct nd_region *nd_region, struct nd_mapping *nd_mapping, in init_dpa_allocation() argument
496 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_dpa_allocation()
503 first_dpa = nd_mapping->start + nd_mapping->size - n; in init_dpa_allocation()
505 first_dpa = nd_mapping->start; in init_dpa_allocation()
536 struct nd_mapping *nd_mapping, struct nd_label_id *label_id, in scan_allocate() argument
539 resource_size_t mapping_end = nd_mapping->start + nd_mapping->size - 1; in scan_allocate()
542 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in scan_allocate()
559 if (res->end < nd_mapping->start) in scan_allocate()
563 if (!first++ && res->start > nd_mapping->start) { in scan_allocate()
564 free_start = nd_mapping->start; in scan_allocate()
636 else if (!is_reserve && free_start != nd_mapping->start) in scan_allocate()
680 return init_dpa_allocation(label_id, nd_region, nd_mapping, n); in scan_allocate()
685 struct nd_mapping *nd_mapping, struct nd_label_id *label_id) in merge_dpa() argument
687 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in merge_dpa()
732 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in __reserve_free_pmem() local
735 if (nd_mapping->nvdimm != nvdimm) in __reserve_free_pmem()
738 n = nd_pmem_available_dpa(nd_region, nd_mapping, &rem); in __reserve_free_pmem()
741 rem = scan_allocate(nd_region, nd_mapping, &label_id, n); in __reserve_free_pmem()
753 struct nd_mapping *nd_mapping) in release_free_pmem() argument
755 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in release_free_pmem()
764 struct nd_mapping *nd_mapping) in reserve_free_pmem() argument
766 struct nvdimm *nvdimm = nd_mapping->nvdimm; in reserve_free_pmem()
772 release_free_pmem(nvdimm_bus, nd_mapping); in reserve_free_pmem()
797 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in grow_dpa_allocation() local
809 rc = reserve_free_pmem(nvdimm_bus, nd_mapping); in grow_dpa_allocation()
813 rem = scan_allocate(nd_region, nd_mapping, in grow_dpa_allocation()
816 release_free_pmem(nvdimm_bus, nd_mapping); in grow_dpa_allocation()
830 rc = merge_dpa(nd_region, nd_mapping, label_id); in grow_dpa_allocation()
851 struct nd_mapping *nd_mapping; in __size_store() local
888 nd_mapping = &nd_region->mapping[i]; in __size_store()
889 ndd = to_ndd(nd_mapping); in __size_store()
1073 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in namespace_update_uuid() local
1082 if (nd_mapping->labels) in namespace_update_uuid()
1089 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in namespace_update_uuid() local
1090 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in namespace_update_uuid()
1238 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in dpa_extents_show() local
1239 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in dpa_extents_show()
1451 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in has_uuid_at_pos() local
1456 for_each_label(l, nd_label, nd_mapping->labels) { in has_uuid_at_pos()
1468 dev_dbg(to_ndd(nd_mapping)->dev, in has_uuid_at_pos()
1496 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in select_pmem_id() local
1501 for_each_label(l, nd_label, nd_mapping->labels) in select_pmem_id()
1515 hw_start = nd_mapping->start; in select_pmem_id()
1516 hw_end = hw_start + nd_mapping->size; in select_pmem_id()
1524 nd_mapping->labels[0] = select; in select_pmem_id()
1525 nd_mapping->labels[1] = NULL; in select_pmem_id()
1597 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in find_pmem_label_set() local
1598 struct nd_namespace_label *label0 = nd_mapping->labels[0]; in find_pmem_label_set()
1657 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in create_namespace_pmem() local
1659 kfree(nd_mapping->labels); in create_namespace_pmem()
1660 nd_mapping->labels = NULL; in create_namespace_pmem()
1759 struct nd_mapping *nd_mapping = &nd_region->mapping[0]; in create_namespace_blk() local
1770 ndd = to_ndd(nd_mapping); in create_namespace_blk()
1771 for_each_label(l, nd_label, nd_mapping->labels) { in create_namespace_blk()
1835 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in create_namespace_blk() local
1837 kfree(nd_mapping->labels); in create_namespace_blk()
1838 nd_mapping->labels = NULL; in create_namespace_blk()
1869 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in init_active_labels() local
1870 struct nvdimm_drvdata *ndd = to_ndd(nd_mapping); in init_active_labels()
1871 struct nvdimm *nvdimm = nd_mapping->nvdimm; in init_active_labels()
1882 dev_name(&nd_mapping->nvdimm->dev)); in init_active_labels()
1885 nd_mapping->ndd = ndd; in init_active_labels()
1893 nd_mapping->labels = kcalloc(count + 1, sizeof(void *), in init_active_labels()
1895 if (!nd_mapping->labels) in init_active_labels()
1901 nd_mapping->labels[j] = label; in init_active_labels()