Lines Matching refs:res
244 struct resource *res, *_r;
248 for_each_dpa_resource_safe(ndd, res, _r)
249 nvdimm_free_dpa(ndd, res);
718 struct resource *res;
740 * In the allocation case ->res is set to free space that we are
744 if (info->res) {
745 if (info->res->start >= nd_mapping->start
746 && info->res->start < map_end)
761 for_each_dpa_resource(ndd, res) {
764 if (strncmp(res->name, "pmem", 4) != 0)
767 start = ALIGN_DOWN(res->start, align);
768 end = ALIGN(res->end + 1, align) - 1;
780 if (info->res && blk_start > info->res->start) {
781 info->res->start = max(info->res->start, blk_start);
782 if (info->res->start > info->res->end)
783 info->res->end = info->res->start - 1;
808 .res = NULL,
810 struct resource *res;
822 for_each_dpa_resource(ndd, res) {
825 if (strncmp(res->name, "blk", 3) != 0)
827 start = ALIGN_DOWN(res->start, align);
828 end = ALIGN(res->end + 1, align) - 1;
850 struct resource *res;
864 for_each_dpa_resource(ndd, res) {
867 if (strcmp(res->name, "pmem-reserve") != 0)
870 start = ALIGN(res->start, align);
871 end = ALIGN_DOWN(res->end + 1, align) - 1;
901 struct resource *res;
915 for_each_dpa_resource(ndd, res) {
918 start = ALIGN_DOWN(res->start, align);
919 end = ALIGN(res->end + 1, align) - 1;
921 if (strncmp(res->name, "blk", 3) == 0)
930 if (strncmp(res->name, "blk", 3) == 0) {
953 nd_dbg_dpa(nd_region, ndd, res, "%s\n", reason);
957 void nvdimm_free_dpa(struct nvdimm_drvdata *ndd, struct resource *res)
960 kfree(res->name);
961 __release_region(&ndd->dpa, res->start, resource_size(res));
969 struct resource *res;
975 res = __request_region(&ndd->dpa, start, n, name, 0);
976 if (!res)
978 return res;
990 struct resource *res;
992 for_each_dpa_resource(ndd, res)
993 if (strcmp(res->name, label_id->id) == 0)
994 allocated += resource_size(res);