Lines Matching refs:nd_region
216 struct nd_region *nd_region = &ndbr->nd_region;
217 struct nd_mapping *nd_mapping = &nd_region->mapping[0];
696 static unsigned long dpa_align(struct nd_region *nd_region)
698 struct device *dev = &nd_region->dev;
703 if (dev_WARN_ONCE(dev, !nd_region->ndr_mappings || nd_region->align
704 % nd_region->ndr_mappings,
706 nd_region->align, nd_region->ndr_mappings))
708 return nd_region->align / nd_region->ndr_mappings;
716 struct nd_region *nd_region;
725 nd_region = to_nd_region(dev);
726 for (i = 0; i < nd_region->ndr_mappings; i++) {
727 nd_mapping = &nd_region->mapping[i];
732 if (i >= nd_region->ndr_mappings)
757 align = dpa_align(nd_region);
800 resource_size_t nd_blk_available_dpa(struct nd_region *nd_region)
802 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev);
803 struct nd_mapping *nd_mapping = &nd_region->mapping[0];
819 align = dpa_align(nd_region);
841 * @nd_region: constrain available space check to this reference region
844 resource_size_t nd_pmem_max_contiguous_dpa(struct nd_region *nd_region,
857 align = dpa_align(nd_region);
862 if (__reserve_free_pmem(&nd_region->dev, nd_mapping->nvdimm))
884 * @nd_region: constrain available space check to this reference region
896 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region,
908 align = dpa_align(nd_region);
953 nd_dbg_dpa(nd_region, ndd, res, "%s\n", reason);