Lines Matching refs:nd_region
27 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local
32 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release()
325 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument
334 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL); in nd_pfn_alloc()
341 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in nd_pfn_alloc()
344 dev->parent = &nd_region->dev; in nd_pfn_alloc()
349 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument
354 if (!is_memory(&nd_region->dev)) in nd_pfn_create()
357 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_create()
499 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe() local
513 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_probe()
609 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent); in trim_pfn_device() local
621 || nd_region_conflict(nd_region, start - adjust, size)) in trim_pfn_device()
630 || nd_region_conflict(nd_region, start, size)) in trim_pfn_device()
640 struct nd_region *nd_region; in nd_pfn_init() local
666 nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_init()
667 if (nd_region->ro) { in nd_pfn_init()
670 dev_name(&nd_region->dev)); in nd_pfn_init()