Lines Matching refs:nd_region

18 	struct nd_region *nd_region = to_nd_region(dev);  in nd_region_probe()  local
20 .start = nd_region->ndr_start, in nd_region_probe()
21 .end = nd_region->ndr_start + nd_region->ndr_size - 1, in nd_region_probe()
24 if (nd_region->num_lanes > num_online_cpus() in nd_region_probe()
25 && nd_region->num_lanes < num_possible_cpus() in nd_region_probe()
28 num_online_cpus(), nd_region->num_lanes, in nd_region_probe()
31 nd_region->num_lanes); in nd_region_probe()
34 rc = nd_region_activate(nd_region); in nd_region_probe()
38 if (devm_init_badblocks(dev, &nd_region->bb)) in nd_region_probe()
40 nd_region->bb_state = in nd_region_probe()
41 sysfs_get_dirent(nd_region->dev.kobj.sd, "badblocks"); in nd_region_probe()
42 if (!nd_region->bb_state) in nd_region_probe()
44 nvdimm_badblocks_populate(nd_region, &nd_region->bb, &range); in nd_region_probe()
46 rc = nd_region_register_namespaces(nd_region, &err); in nd_region_probe()
57 nd_region->btt_seed = nd_btt_create(nd_region); in nd_region_probe()
58 nd_region->pfn_seed = nd_pfn_create(nd_region); in nd_region_probe()
59 nd_region->dax_seed = nd_dax_create(nd_region); in nd_region_probe()
85 struct nd_region *nd_region = to_nd_region(dev); in nd_region_remove() local
91 nd_region->ns_seed = NULL; in nd_region_remove()
92 nd_region->btt_seed = NULL; in nd_region_remove()
93 nd_region->pfn_seed = NULL; in nd_region_remove()
94 nd_region->dax_seed = NULL; in nd_region_remove()
102 sysfs_put(nd_region->bb_state); in nd_region_remove()
103 nd_region->bb_state = NULL; in nd_region_remove()
125 struct nd_region *nd_region = to_nd_region(dev); in nd_region_notify() local
127 if (is_memory(&nd_region->dev)) { in nd_region_notify()
129 .start = nd_region->ndr_start, in nd_region_notify()
130 .end = nd_region->ndr_start + in nd_region_notify()
131 nd_region->ndr_size - 1, in nd_region_notify()
134 nvdimm_badblocks_populate(nd_region, in nd_region_notify()
135 &nd_region->bb, &range); in nd_region_notify()
136 if (nd_region->bb_state) in nd_region_notify()
137 sysfs_notify_dirent(nd_region->bb_state); in nd_region_notify()