Home
last modified time | relevance | path

Searched refs:nd_region (Results 1 – 20 of 20) sorted by relevance

/linux-4.4.14/drivers/nvdimm/
Dregion_devs.c27 struct nd_region *nd_region = to_nd_region(dev); in nd_region_release() local
30 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_release()
31 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_region_release()
36 free_percpu(nd_region->lane); in nd_region_release()
37 ida_simple_remove(&region_ida, nd_region->id); in nd_region_release()
41 kfree(nd_region); in nd_region_release()
69 struct nd_region *to_nd_region(struct device *dev) in to_nd_region()
71 struct nd_region *nd_region = container_of(dev, struct nd_region, dev); in to_nd_region() local
74 return nd_region; in to_nd_region()
80 struct nd_region *nd_region = to_nd_region(dev); in to_nd_blk_region() local
[all …]
Dnamespace_devs.c40 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_blk_release() local
43 ida_simple_remove(&nd_region->ns_ida, nsblk->id); in namespace_blk_release()
135 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local
140 if (!test_bit(ND_REGION_PAGEMAP, &nd_region->flags)) in pmem_should_map_pages()
157 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() local
174 sprintf(name, "pmem%d%s", nd_region->id, suffix ? suffix : ""); in nvdimm_namespace_disk_name()
179 sprintf(name, "ndblk%d.%d%s", nd_region->id, nsblk->id, in nvdimm_namespace_disk_name()
212 struct nd_region *nd_region = to_nd_region(dev->parent); in nstype_show() local
214 return sprintf(buf, "%d\n", nd_region_to_nstype(nd_region)); in nstype_show()
266 struct nd_region *nd_region = to_nd_region(nsblk->common.dev.parent); in nd_namespace_blk_size() local
[all …]
Dregion.c24 struct nd_region *nd_region = to_nd_region(dev); in nd_region_probe() local
26 if (nd_region->num_lanes > num_online_cpus() in nd_region_probe()
27 && nd_region->num_lanes < num_possible_cpus() in nd_region_probe()
30 num_online_cpus(), nd_region->num_lanes, in nd_region_probe()
33 nd_region->num_lanes); in nd_region_probe()
36 rc = nd_blk_region_init(nd_region); in nd_region_probe()
40 rc = nd_region_register_namespaces(nd_region, &err); in nd_region_probe()
55 nd_region->btt_seed = nd_btt_create(nd_region); in nd_region_probe()
56 nd_region->pfn_seed = nd_pfn_create(nd_region); in nd_region_probe()
82 struct nd_region *nd_region = to_nd_region(dev); in nd_region_remove() local
[all …]
Dnd-core.h52 struct nd_region;
53 void nd_region_create_blk_seed(struct nd_region *nd_region);
54 void nd_region_create_btt_seed(struct nd_region *nd_region);
67 struct nd_region;
70 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region,
73 resource_size_t nd_region_available_dpa(struct nd_region *nd_region);
77 struct resource *nsblk_add_resource(struct nd_region *nd_region,
Dnd.h98 struct nd_region { struct
123 struct nd_region nd_region; argument
198 struct device *nd_btt_create(struct nd_region *nd_region);
210 static inline struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument
220 struct device *nd_pfn_create(struct nd_region *nd_region);
233 static inline struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument
244 struct nd_region *to_nd_region(struct device *dev);
245 int nd_region_to_nstype(struct nd_region *nd_region);
246 int nd_region_register_namespaces(struct nd_region *nd_region, int *err);
247 u64 nd_region_interleave_set_cookie(struct nd_region *nd_region);
[all …]
Dpfn_devs.c26 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local
31 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release()
181 static struct device *__nd_pfn_create(struct nd_region *nd_region, in __nd_pfn_create() argument
189 if (!is_nd_pmem(&nd_region->dev)) in __nd_pfn_create()
196 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL); in __nd_pfn_create()
207 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in __nd_pfn_create()
208 dev->parent = &nd_region->dev; in __nd_pfn_create()
221 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument
223 struct device *dev = __nd_pfn_create(nd_region, NULL, PFN_MODE_NONE, in nd_pfn_create()
310 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe() local
[all …]
Dbtt_devs.c26 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_btt_release() local
31 ida_simple_remove(&nd_region->btt_ida, nd_btt->id); in nd_btt_release()
161 static struct device *__nd_btt_create(struct nd_region *nd_region, in __nd_btt_create() argument
172 nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL); in __nd_btt_create()
183 dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id); in __nd_btt_create()
184 dev->parent = &nd_region->dev; in __nd_btt_create()
197 struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument
199 struct device *dev = __nd_btt_create(nd_region, 0, NULL, NULL); in nd_btt_create()
281 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_btt_probe() local
287 dev = __nd_btt_create(nd_region, 0, NULL, ndns); in nd_btt_probe()
Dlabel.h134 struct nd_region;
137 int nd_pmem_namespace_label_update(struct nd_region *nd_region,
139 int nd_blk_namespace_label_update(struct nd_region *nd_region,
Dpmem.c230 struct nd_region *nd_region; in nd_pfn_init() local
249 nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_init()
250 if (nd_region->ro) { in nd_pfn_init()
253 dev_name(&nd_region->dev)); in nd_pfn_init()
315 struct nd_region *nd_region; in nvdimm_namespace_attach_pfn() local
324 nd_region = to_nd_region(dev->parent); in nvdimm_namespace_attach_pfn()
375 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pmem_probe() local
385 pmem = pmem_alloc(dev, &nsio->res, nd_region->id); in nd_pmem_probe()
Dlabel.c296 struct nd_region *nd_region = NULL; in nd_label_reserve_dpa() local
313 nd_dbg_dpa(nd_region, ndd, res, "reserve\n"); in nd_label_reserve_dpa()
493 static int __pmem_label_update(struct nd_region *nd_region, in __pmem_label_update() argument
497 u64 cookie = nd_region_interleave_set_cookie(nd_region), rawsize; in __pmem_label_update()
522 nd_label->nlabel = __cpu_to_le16(nd_region->ndr_mappings); in __pmem_label_update()
526 nd_region->ndr_mappings); in __pmem_label_update()
606 static int __blk_label_update(struct nd_region *nd_region, in __blk_label_update() argument
682 if (!nsblk_add_resource(nd_region, ndd, nsblk, res->start)) { in __blk_label_update()
881 int nd_pmem_namespace_label_update(struct nd_region *nd_region, in nd_pmem_namespace_label_update() argument
886 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_pmem_namespace_label_update()
[all …]
Dclaim.c80 struct nd_region *nd_region = to_nd_region(dev->parent); in is_idle() local
84 seed = nd_region->btt_seed; in is_idle()
86 seed = nd_region->pfn_seed; in is_idle()
Ddimm_devs.c214 struct nd_region *nd_region = &ndbr->nd_region; in nd_blk_region_to_dimm() local
215 struct nd_mapping *nd_mapping = &nd_region->mapping[0]; in nd_blk_region_to_dimm()
423 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, in nd_pmem_available_dpa() argument
481 nd_dbg_dpa(nd_region, ndd, res, "%s\n", reason); in nd_pmem_available_dpa()
Dbtt.c973 lane = nd_region_acquire_lane(btt->nd_region); in btt_read_pg()
1032 nd_region_release_lane(btt->nd_region, lane); in btt_read_pg()
1044 nd_region_release_lane(btt->nd_region, lane); in btt_read_pg()
1061 lane = nd_region_acquire_lane(btt->nd_region); in btt_write_pg()
1120 nd_region_release_lane(btt->nd_region, lane); in btt_write_pg()
1132 nd_region_release_lane(btt->nd_region, lane); in btt_write_pg()
1306 u32 lbasize, u8 *uuid, struct nd_region *nd_region) in btt_init() argument
1322 btt->nd_region = nd_region; in btt_init()
1330 if (btt->init_state != INIT_READY && nd_region->ro) { in btt_init()
1332 dev_name(&nd_region->dev)); in btt_init()
[all …]
Dbtt.h180 struct nd_region *nd_region; member
Dbus.c239 struct nd_region *nd_region = to_nd_region(dev->parent); in nvdimm_revalidate_disk() local
240 const char *pol = nd_region->ro ? "only" : "write"; in nvdimm_revalidate_disk()
242 if (nd_region->ro == get_disk_ro(disk)) in nvdimm_revalidate_disk()
246 dev_name(&nd_region->dev), pol, disk->disk_name, pol); in nvdimm_revalidate_disk()
247 set_disk_ro(disk, nd_region->ro); in nvdimm_revalidate_disk()
/linux-4.4.14/include/linux/
Dlibnvdimm.h126 struct nd_region *to_nd_region(struct device *dev);
142 struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus,
144 struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus,
146 struct nd_region *nvdimm_volatile_region_create(struct nvdimm_bus *nvdimm_bus,
148 void *nd_region_provider_data(struct nd_region *nd_region);
152 unsigned int nd_region_acquire_lane(struct nd_region *nd_region);
153 void nd_region_release_lane(struct nd_region *nd_region, unsigned int lane);
/linux-4.4.14/drivers/acpi/
Dnfit.h142 struct nd_region *nd_region; member
Dnfit.c927 struct nd_region *nd_region = to_nd_region(dev); in range_index_show() local
928 struct nfit_spa *nfit_spa = nd_region_provider_data(nd_region); in range_index_show()
1167 struct nd_region *nd_region = nfit_blk->nd_region; in acpi_nfit_blk_region_do_io() local
1171 lane = nd_region_acquire_lane(nd_region); in acpi_nfit_blk_region_do_io()
1183 nd_region_release_lane(nd_region, lane); in acpi_nfit_blk_region_do_io()
1371 nfit_blk->nd_region = to_nd_region(dev); in acpi_nfit_blk_region_enable()
/linux-4.4.14/tools/testing/nvdimm/test/
Dnfit.c1145 struct nd_region *nd_region = &ndbr->nd_region; in nfit_test_blk_do_io() local
1148 lane = nd_region_acquire_lane(nd_region); in nfit_test_blk_do_io()
1157 nd_region_release_lane(nd_region, lane); in nfit_test_blk_do_io()
/linux-4.4.14/Documentation/nvdimm/
Dnvdimm.txt440 struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus,
442 struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus,
451 | |-- driver -> ../../../../../bus/nd/drivers/nd_region
567 (outside of nd_region). For example, if a vendor defined its own LABEL