Home
last modified time | relevance | path

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

12

/linux/drivers/nvdimm/
H A Dregion_devs.c63 static int nd_region_invalidate_memregion(struct nd_region *nd_region) in nd_region_invalidate_memregion() argument
67 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_invalidate_memregion()
68 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_region_invalidate_memregion()
83 &nd_region->dev, in nd_region_invalidate_memregion()
87 dev_err(&nd_region->dev, in nd_region_invalidate_memregion()
95 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_invalidate_memregion()
96 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_region_invalidate_memregion()
105 static int get_flush_data(struct nd_region *nd_region, size_ argument
133 nd_region_activate(struct nd_region * nd_region) nd_region_activate() argument
186 struct nd_region *nd_region = to_nd_region(dev); nd_region_release() local
203 struct nd_region *nd_region = container_of(dev, struct nd_region, dev); to_nd_region() local
210 nd_region_dev(struct nd_region * nd_region) nd_region_dev() argument
218 nd_region_provider_data(struct nd_region * nd_region) nd_region_provider_data() argument
232 nd_region_to_nstype(struct nd_region * nd_region) nd_region_to_nstype() argument
254 region_size(struct nd_region * nd_region) region_size() argument
270 struct nd_region *nd_region = to_nd_region(dev); size_show() local
279 struct nd_region *nd_region = to_nd_region(dev); deep_flush_show() local
293 struct nd_region *nd_region = to_nd_region(dev); deep_flush_store() local
310 struct nd_region *nd_region = to_nd_region(dev); mappings_show() local
319 struct nd_region *nd_region = to_nd_region(dev); nstype_show() local
328 struct nd_region *nd_region = to_nd_region(dev); set_cookie_show() local
366 nd_region_available_dpa(struct nd_region * nd_region) nd_region_available_dpa() argument
388 nd_region_allocatable_dpa(struct nd_region * nd_region) nd_region_allocatable_dpa() argument
406 struct nd_region *nd_region = to_nd_region(dev); available_size_show() local
425 struct nd_region *nd_region = to_nd_region(dev); max_available_extent_show() local
451 struct nd_region *nd_region = to_nd_region(dev); namespace_seed_show() local
464 struct nd_region *nd_region = to_nd_region(dev); btt_seed_show() local
477 struct nd_region *nd_region = to_nd_region(dev); pfn_seed_show() local
490 struct nd_region *nd_region = to_nd_region(dev); dax_seed_show() local
503 struct nd_region *nd_region = to_nd_region(dev); read_only_show() local
519 struct nd_region *nd_region = to_nd_region(dev); read_only_store() local
533 struct nd_region *nd_region = to_nd_region(dev); align_show() local
541 struct nd_region *nd_region = to_nd_region(dev); align_store() local
578 struct nd_region *nd_region = to_nd_region(dev); region_badblocks_show() local
595 struct nd_region *nd_region = to_nd_region(dev); resource_show() local
604 struct nd_region *nd_region = to_nd_region(dev); persistence_domain_show() local
639 struct nd_region *nd_region = to_nd_region(dev); region_visible() local
691 struct nd_region *nd_region = to_nd_region(dev); mappingN() local
753 struct nd_region *nd_region = to_nd_region(dev); mapping_visible() local
836 nd_region_interleave_set_cookie(struct nd_region * nd_region,struct nd_namespace_index * nsindex) nd_region_interleave_set_cookie() argument
850 nd_region_interleave_set_altcookie(struct nd_region * nd_region) nd_region_interleave_set_altcookie() argument
874 nd_region_advance_seeds(struct nd_region * nd_region,struct device * dev) nd_region_advance_seeds() argument
920 nd_region_acquire_lane(struct nd_region * nd_region) nd_region_acquire_lane() argument
941 nd_region_release_lane(struct nd_region * nd_region,unsigned int lane) nd_region_release_lane() argument
962 default_align(struct nd_region * nd_region) default_align() argument
986 struct nd_region *nd_region; nd_region_create() local
1104 nvdimm_region_delete(struct nd_region * nd_region) nvdimm_region_delete() argument
1111 nvdimm_flush(struct nd_region * nd_region,struct bio * bio) nvdimm_flush() argument
1128 generic_nvdimm_flush(struct nd_region * nd_region) generic_nvdimm_flush() argument
1165 nvdimm_has_flush(struct nd_region * nd_region) nvdimm_has_flush() argument
1196 nvdimm_has_cache(struct nd_region * nd_region) nvdimm_has_cache() argument
1203 is_nvdimm_sync(struct nd_region * nd_region) is_nvdimm_sync() argument
[all...]
H A Dregion.c18 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()
[all …]
H A Dnamespace_devs.c27 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_pmem_release() local
30 ida_free(&nd_region->ns_ida, nspm->id); in namespace_pmem_release()
92 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local
99 if (!test_bit(ND_REGION_PAGEMAP, &nd_region->flags)) in pmem_should_map_pages()
144 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() local
161 sprintf(name, "pmem%d.%d%s", nd_region->id, nsidx, in nvdimm_namespace_disk_name()
164 sprintf(name, "pmem%d%s", nd_region->id, in nvdimm_namespace_disk_name()
188 struct nd_region *nd_region = to_nd_region(dev->parent); in nstype_show() local
190 return sprintf(buf, "%d\n", nd_region_to_nstype(nd_region)); in nstype_show()
235 static int nd_namespace_label_update(struct nd_region *nd_region, in nd_namespace_label_update() argument
[all …]
H A Dnd-core.h100 struct nd_region;
101 void nd_region_advance_seeds(struct nd_region *nd_region, struct device *dev);
102 void nd_region_create_ns_seed(struct nd_region *nd_region);
103 void nd_region_create_btt_seed(struct nd_region *nd_region);
104 void nd_region_create_pfn_seed(struct nd_region *nd_region);
105 void nd_region_create_dax_seed(struct nd_region *nd_region);
115 struct nd_region;
124 resource_size_t nd_pmem_max_contiguous_dpa(struct nd_region *nd_region,
126 resource_size_t nd_region_allocatable_dpa(struct nd_region *nd_region);
127 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region,
[all …]
H A Ddax_devs.c15 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_dax_release() local
21 ida_free(&nd_region->dax_ida, nd_pfn->id); in nd_dax_release()
47 static struct nd_dax *nd_dax_alloc(struct nd_region *nd_region) in nd_dax_alloc() argument
58 nd_pfn->id = ida_alloc(&nd_region->dax_ida, GFP_KERNEL); in nd_dax_alloc()
65 dev_set_name(dev, "dax%d.%d", nd_region->id, nd_pfn->id); in nd_dax_alloc()
67 dev->parent = &nd_region->dev; in nd_dax_alloc()
72 struct device *nd_dax_create(struct nd_region *nd_region) in nd_dax_create() argument
77 if (!is_memory(&nd_region->dev)) in nd_dax_create()
80 nd_dax = nd_dax_alloc(nd_region); in nd_dax_create()
94 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_dax_probe() local
[all …]
H A Dnd.h402 struct nd_region {
423 int (*flush)(struct nd_region *nd_region, struct bio *bio);
427 static inline bool nsl_validate_nlabel(struct nd_region *nd_region,
433 return nsl_get_nlabel(ndd, nd_label) == nd_region->ndr_mappings; in nsl_validate_nlabel()
543 struct device *nd_btt_create(struct nd_region *nd_region);
556 static inline struct device *nd_btt_create(struct nd_region *nd_region)
403 struct nd_region { global() struct
424 flushnd_region global() argument
428 nsl_validate_nlabel(struct nd_region * nd_region,struct nvdimm_drvdata * ndd,struct nd_namespace_label * nd_label) nsl_validate_nlabel() argument
557 nd_btt_create(struct nd_region * nd_region) nd_btt_create() argument
587 nd_pfn_create(struct nd_region * nd_region) nd_pfn_create() argument
622 nd_dax_create(struct nd_region * nd_region) nd_dax_create() argument
[all...]
H A Dbtt_devs.c17 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_btt_release() local
22 ida_free(&nd_region->btt_ida, nd_btt->id); in nd_btt_release()
176 static struct device *__nd_btt_create(struct nd_region *nd_region, in __nd_btt_create() argument
187 nd_btt->id = ida_alloc(&nd_region->btt_ida, GFP_KERNEL); in __nd_btt_create()
199 dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id); in __nd_btt_create()
200 dev->parent = &nd_region->dev; in __nd_btt_create()
213 ida_free(&nd_region->btt_ida, nd_btt->id); in __nd_btt_create()
220 struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument
222 struct device *dev = __nd_btt_create(nd_region, 0, NULL, NULL); in nd_btt_create()
333 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_btt_probe() local
[all …]
H A Dpfn_devs.c20 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local
25 ida_free(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release()
309 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument
318 nd_pfn->id = ida_alloc(&nd_region->pfn_ida, GFP_KERNEL); in nd_pfn_alloc()
325 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in nd_pfn_alloc()
327 dev->parent = &nd_region->dev; in nd_pfn_alloc()
332 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument
337 if (!is_memory(&nd_region->dev)) in nd_pfn_create()
340 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_create()
355 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_clear_memmap_errors() local
[all …]
H A Dnd_virtio.c38 static int virtio_pmem_flush(struct nd_region *nd_region) in virtio_pmem_flush() argument
40 struct virtio_device *vdev = nd_region->provider_data; in virtio_pmem_flush()
111 int async_pmem_flush(struct nd_region *nd_region, struct bio *bio) in async_pmem_flush() argument
130 if (virtio_pmem_flush(nd_region)) in async_pmem_flush()
H A Dbus.c148 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event) in nvdimm_region_notify() argument
150 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev); in nvdimm_region_notify()
156 nd_device_notify(&nd_region->dev, event); in nvdimm_region_notify()
167 struct nd_region *nd_region; in nvdimm_clear_badblocks_region() local
175 nd_region = to_nd_region(dev); in nvdimm_clear_badblocks_region()
176 ndr_end = nd_region->ndr_start + nd_region->ndr_size - 1; in nvdimm_clear_badblocks_region()
179 if (ctx->phys < nd_region->ndr_start || in nvdimm_clear_badblocks_region()
183 sector = (ctx->phys - nd_region->ndr_start) / 512; in nvdimm_clear_badblocks_region()
184 badblocks_clear(&nd_region->bb, sector, ctx->cleared / 512); in nvdimm_clear_badblocks_region()
186 if (nd_region->bb_state) in nvdimm_clear_badblocks_region()
[all …]
H A Ddimm_devs.c693 static unsigned long dpa_align(struct nd_region *nd_region) in dpa_align() argument
695 struct device *dev = &nd_region->dev; in dpa_align()
700 if (dev_WARN_ONCE(dev, !nd_region->ndr_mappings || nd_region->align in dpa_align()
701 % nd_region->ndr_mappings, in dpa_align()
703 nd_region->align, nd_region->ndr_mappings)) in dpa_align()
705 return nd_region->align / nd_region->ndr_mappings; in dpa_align()
717 resource_size_t nd_pmem_max_contiguous_dpa(struct nd_region *nd_region, in nd_pmem_max_contiguous_dpa() argument
730 align = dpa_align(nd_region); in nd_pmem_max_contiguous_dpa()
735 if (__reserve_free_pmem(&nd_region->dev, nd_mapping->nvdimm)) in nd_pmem_max_contiguous_dpa()
764 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, in nd_pmem_available_dpa() argument
[all …]
H A Dlabel.c409 struct nd_region *nd_region = NULL; in nd_label_reserve_dpa() local
426 nd_dbg_dpa(nd_region, ndd, res, "reserve\n"); in nd_label_reserve_dpa()
874 static int __pmem_label_update(struct nd_region *nd_region, in __pmem_label_update() argument
879 struct nd_interleave_set *nd_set = nd_region->nd_set; in __pmem_label_update()
895 cookie = nd_region_interleave_set_cookie(nd_region, nsindex); in __pmem_label_update()
917 nsl_set_nlabel(ndd, nd_label, nd_region->ndr_mappings); in __pmem_label_update()
928 nd_dbg_dpa(nd_region, ndd, res, "\n"); in __pmem_label_update()
1057 int nd_pmem_namespace_label_update(struct nd_region *nd_region, in nd_pmem_namespace_label_update() argument
1062 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_pmem_namespace_label_update()
1063 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_pmem_namespace_label_update()
[all …]
H A Dbadrange.c269 void nvdimm_badblocks_populate(struct nd_region *nd_region, in nvdimm_badblocks_populate() argument
274 if (!is_memory(&nd_region->dev)) { in nvdimm_badblocks_populate()
275 dev_WARN_ONCE(&nd_region->dev, 1, in nvdimm_badblocks_populate()
279 nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev); in nvdimm_badblocks_populate()
H A Dclaim.c60 struct nd_region *nd_region = to_nd_region(dev->parent); in is_idle() local
64 seed = nd_region->btt_seed; in is_idle()
66 seed = nd_region->pfn_seed; in is_idle()
68 seed = nd_region->dax_seed; in is_idle()
H A Dlabel.h222 struct nd_region;
224 int nd_pmem_namespace_label_update(struct nd_region *nd_region,
H A Dbtt.h228 struct nd_region *nd_region; member
H A Dof_pmem.c56 struct nd_region *region; in of_pmem_region_probe()
/linux/drivers/acpi/nfit/
H A Dnfit.h165 struct nd_region *nd_region; member
300 struct nd_region *nd_region; member
H A Dcore.c2190 struct nd_region *nd_region = to_nd_region(dev);
2191 struct nfit_spa *nfit_spa = nd_region_provider_data(nd_region);
2444 struct nd_region *nd_region = nfit_spa->nd_region; in ars_complete()
2476 if (nd_region) { in ars_complete()
2477 dev = nd_region_dev(nd_region);
2478 nvdimm_region_notify(nd_region, NVDIMM_REVALIDATE_POISON); in ars_status_process_records()
2620 if (nfit_spa->nd_region) in acpi_nfit_register_region()
2184 struct nd_region *nd_region = to_nd_region(dev); range_index_show() local
2438 struct nd_region *nd_region = nfit_spa->nd_region; ars_complete() local
[all...]
H A Dmce.c68 nvdimm_region_notify(nfit_spa->nd_region, in nfit_handle_mce()
/linux/include/linux/
H A Dnd.h194 struct nd_region;
195 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event);
/linux/tools/testing/nvdimm/test/
H A Dndtest.h36 struct nd_region *blk_region;
62 struct nd_region *region;
H A Dnfit.c634 struct nd_region *region;
645 struct nd_region *nd_region; in nfit_test_search_region_spa() local
651 nd_region = to_nd_region(dev); in nfit_test_search_region_spa()
652 ndr_end = nd_region->ndr_start + nd_region->ndr_size; in nfit_test_search_region_spa()
654 if (ctx->addr >= nd_region->ndr_start && ctx->addr < ndr_end) { in nfit_test_search_region_spa()
655 ctx->region = nd_region; in nfit_test_search_region_spa()
666 struct nd_region *nd_region = NULL; in nfit_test_search_spa() local
682 nd_region = ctx.region; in nfit_test_search_spa()
684 dpa = ctx.addr - nd_region->ndr_start; in nfit_test_search_spa()
689 nd_mapping = &nd_region->mapping[nd_region->ndr_mappings - 1]; in nfit_test_search_spa()
/linux/drivers/cxl/
H A Dpmem.c380 static void unregister_nvdimm_region(void *nd_region) in unregister_nvdimm_region() argument
382 nvdimm_region_delete(nd_region); in unregister_nvdimm_region()
496 cxlr_pmem->nd_region = in cxl_pmem_region_probe()
498 if (!cxlr_pmem->nd_region) { in cxl_pmem_region_probe()
504 cxlr_pmem->nd_region); in cxl_pmem_region_probe()
/linux/arch/powerpc/platforms/pseries/
H A Dpapr_scm.c69 struct nd_region *region;
92 static int papr_scm_pmem_flush(struct nd_region *nd_region, in papr_scm_pmem_flush()
95 struct papr_scm_priv *p = nd_region_provider_data(nd_region); in papr_scm_pmem_flush()
1299 static void papr_scm_add_badblock(struct nd_region *region, in papr_scm_add_badblock()
91 papr_scm_pmem_flush(struct nd_region * nd_region,struct bio * bio __maybe_unused) papr_scm_pmem_flush() argument

12