Lines Matching refs:nd_region
18 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local
23 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release()
318 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument
327 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL); in nd_pfn_alloc()
334 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in nd_pfn_alloc()
336 dev->parent = &nd_region->dev; in nd_pfn_alloc()
341 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument
346 if (!is_memory(&nd_region->dev)) in nd_pfn_create()
349 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_create()
364 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_clear_memmap_errors() local
392 bb_present = badblocks_check(&nd_region->bb, meta_start, in nd_pfn_clear_memmap_errors()
397 nsoff = ALIGN_DOWN((nd_region->ndr_start in nd_pfn_clear_memmap_errors()
621 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe() local
635 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_probe()
725 struct nd_region *nd_region; in nd_pfn_init() local
753 nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_init()
754 if (nd_region->ro) { in nd_pfn_init()
757 dev_name(&nd_region->dev)); in nd_pfn_init()