Home
last modified time | relevance | path

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

12

/openbmc/linux/drivers/nvdimm/
H A Dregion_devs.c105 int nd_region_activate(struct nd_region *nd_region) in nd_region_activate() argument
173 struct nd_region *nd_region = to_nd_region(dev); in nd_region_release() local
190 struct nd_region *nd_region = container_of(dev, struct nd_region, dev); in to_nd_region() local
257 struct nd_region *nd_region = to_nd_region(dev); in size_show() local
1004 struct nd_region *nd_region; in nd_region_create() local
1085 nd_region->align = default_align(nd_region); in nd_region_create()
1137 if (nd_region->flush(nd_region, bio)) in nvdimm_flush()
1233 struct nd_region *nd_region; member
1239 struct nd_region *nd_region; in region_conflict() local
1247 if (nd_region == ctx->nd_region) in region_conflict()
[all …]
H A Dregion.c18 struct nd_region *nd_region = to_nd_region(dev); in nd_region_probe() local
21 .end = nd_region->ndr_start + nd_region->ndr_size - 1, in nd_region_probe()
31 nd_region->num_lanes); in nd_region_probe()
40 nd_region->bb_state = 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()
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
[all …]
H A Dnamespace_devs.c27 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_pmem_release() local
90 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local
186 struct nd_region *nd_region = to_nd_region(dev->parent); in nstype_show() local
294 static int scan_free(struct nd_region *nd_region, in scan_free() argument
400 align = nd_region->align / nd_region->ndr_mappings; in space_valid()
574 static int merge_dpa(struct nd_region *nd_region, in merge_dpa() argument
608 struct nd_region *nd_region; in __reserve_free_pmem() local
1852 nd_region->dax_seed = nd_dax_create(nd_region); in nd_region_create_dax_seed()
1864 nd_region->pfn_seed = nd_pfn_create(nd_region); in nd_region_create_pfn_seed()
1876 nd_region->btt_seed = nd_btt_create(nd_region); in nd_region_create_btt_seed()
[all …]
H A Dnd-core.h100 struct nd_region;
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,
129 resource_size_t nd_region_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_simple_remove(&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_simple_get(&nd_region->dax_ida, 0, 0, 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.h403 struct nd_region { struct
424 int (*flush)(struct nd_region *nd_region, struct bio *bio); argument
428 static inline bool nsl_validate_nlabel(struct nd_region *nd_region, in nsl_validate_nlabel() argument
545 struct device *nd_btt_create(struct nd_region *nd_region);
571 struct device *nd_pfn_create(struct nd_region *nd_region);
603 struct device *nd_dax_create(struct nd_region *nd_region);
622 int nd_region_to_nstype(struct nd_region *nd_region);
624 u64 nd_region_interleave_set_cookie(struct nd_region *nd_region,
626 u64 nd_region_interleave_set_altcookie(struct nd_region *nd_region);
647 void nvdimm_badblocks_populate(struct nd_region *nd_region,
[all …]
H A Dbtt_devs.c17 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_btt_release() local
22 ida_simple_remove(&nd_region->btt_ida, nd_btt->id); in nd_btt_release()
183 static struct device *__nd_btt_create(struct nd_region *nd_region, in __nd_btt_create() argument
194 nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL); in __nd_btt_create()
206 dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id); in __nd_btt_create()
207 dev->parent = &nd_region->dev; in __nd_btt_create()
220 ida_simple_remove(&nd_region->btt_ida, nd_btt->id); in __nd_btt_create()
227 struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument
229 struct device *dev = __nd_btt_create(nd_region, 0, NULL, NULL); in nd_btt_create()
340 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_btt_probe() 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()
101 int async_pmem_flush(struct nd_region *nd_region, struct bio *bio) in async_pmem_flush() argument
120 if (virtio_pmem_flush(nd_region)) in async_pmem_flush()
H A Dpfn_devs.c20 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local
320 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument
338 dev->parent = &nd_region->dev; in nd_pfn_alloc()
343 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument
348 if (!is_memory(&nd_region->dev)) in nd_pfn_create()
351 nd_pfn = nd_pfn_alloc(nd_region); in nd_pfn_create()
366 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_clear_memmap_errors() local
628 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe() local
732 struct nd_region *nd_region; in nd_pfn_init() local
761 if (nd_region->ro) { in nd_pfn_init()
[all …]
H A Dbus.c148 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event) in nvdimm_region_notify() argument
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()
186 if (nd_region->bb_state) in nvdimm_clear_badblocks_region()
626 struct nd_region *nd_region = to_nd_region(dev->parent); in nvdimm_check_and_set_ro() local
630 if (disk_ro == nd_region->ro) in nvdimm_check_and_set_ro()
634 dev_name(&nd_region->dev), nd_region->ro ? "only" : "write", in nvdimm_check_and_set_ro()
678 struct nd_region *nd_region = NULL; in nvdimm_dev_to_target_node() local
685 if (!nd_region) in nvdimm_dev_to_target_node()
[all …]
H A Ddimm_devs.c705 static unsigned long dpa_align(struct nd_region *nd_region) in dpa_align() argument
707 struct device *dev = &nd_region->dev; in dpa_align()
712 if (dev_WARN_ONCE(dev, !nd_region->ndr_mappings || nd_region->align in dpa_align()
713 % nd_region->ndr_mappings, in dpa_align()
715 nd_region->align, nd_region->ndr_mappings)) in dpa_align()
717 return nd_region->align / nd_region->ndr_mappings; in dpa_align()
726 resource_size_t nd_pmem_max_contiguous_dpa(struct nd_region *nd_region, in nd_pmem_max_contiguous_dpa() argument
739 align = dpa_align(nd_region); in nd_pmem_max_contiguous_dpa()
771 resource_size_t nd_pmem_available_dpa(struct nd_region *nd_region, in nd_pmem_available_dpa() argument
782 align = dpa_align(nd_region); in nd_pmem_available_dpa()
[all …]
H A Dpmem.c44 static struct nd_region *to_region(struct pmem_device *pmem) in to_region()
210 struct nd_region *nd_region = to_region(pmem); in pmem_submit_bio() local
213 ret = nvdimm_flush(nd_region, bio); in pmem_submit_bio()
234 ret = nvdimm_flush(nd_region, bio); in pmem_submit_bio()
453 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_attach_disk() local
488 fua = nvdimm_has_flush(nd_region); in pmem_attach_disk()
567 if (is_nvdimm_sync(nd_region)) in pmem_attach_disk()
675 struct nd_region *nd_region; in pmem_revalidate_poison() local
687 nd_region = to_nd_region(ndns->dev.parent); in pmem_revalidate_poison()
694 nd_region = to_region(pmem); in pmem_revalidate_poison()
[all …]
H A Dvirtio_pmem.c35 struct nd_region *nd_region; in virtio_pmem_probe() local
100 nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc); in virtio_pmem_probe()
101 if (!nd_region) { in virtio_pmem_probe()
H A Dvirtio_pmem.h54 int async_pmem_flush(struct nd_region *nd_region, struct bio *bio);
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()
873 static int __pmem_label_update(struct nd_region *nd_region, in __pmem_label_update() argument
878 struct nd_interleave_set *nd_set = nd_region->nd_set; in __pmem_label_update()
916 nsl_set_nlabel(ndd, nd_label, nd_region->ndr_mappings); in __pmem_label_update()
927 nd_dbg_dpa(nd_region, ndd, res, "\n"); in __pmem_label_update()
1056 int nd_pmem_namespace_label_update(struct nd_region *nd_region, in nd_pmem_namespace_label_update() argument
1061 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_pmem_namespace_label_update()
1062 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_pmem_namespace_label_update()
1093 for (i = 0; i < nd_region->ndr_mappings; 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 Dlabel.h222 struct nd_region;
224 int nd_pmem_namespace_label_update(struct nd_region *nd_region,
H A Dclaim.c79 struct nd_region *nd_region = to_nd_region(dev->parent); in is_idle() local
83 seed = nd_region->btt_seed; in is_idle()
85 seed = nd_region->pfn_seed; in is_idle()
87 seed = nd_region->dax_seed; in is_idle()
H A Dbtt.c1207 lane = nd_region_acquire_lane(btt->nd_region); in btt_read_pg()
1277 nd_region_release_lane(btt->nd_region, lane); in btt_read_pg()
1289 nd_region_release_lane(btt->nd_region, lane); in btt_read_pg()
1401 nd_region_release_lane(btt->nd_region, lane); in btt_write_pg()
1419 nd_region_release_lane(btt->nd_region, lane); in btt_write_pg()
1566 struct nd_region *nd_region) in btt_init() argument
1583 btt->nd_region = nd_region; in btt_init()
1595 dev_name(&nd_region->dev)); in btt_init()
1648 struct nd_region *nd_region; in nvdimm_namespace_attach_btt() local
1683 nd_region = to_nd_region(nd_btt->dev.parent); in nvdimm_namespace_attach_btt()
[all …]
/openbmc/linux/include/linux/
H A Dlibnvdimm.h124 struct nd_region;
138 int (*flush)(struct nd_region *nd_region, struct bio *bio);
254 struct device *nd_region_dev(struct nd_region *nd_region);
276 void nvdimm_region_delete(struct nd_region *nd_region);
292 void *nd_region_provider_data(struct nd_region *nd_region);
293 unsigned int nd_region_acquire_lane(struct nd_region *nd_region);
296 int nvdimm_flush(struct nd_region *nd_region, struct bio *bio);
297 int generic_nvdimm_flush(struct nd_region *nd_region);
298 int nvdimm_has_flush(struct nd_region *nd_region);
299 int nvdimm_has_cache(struct nd_region *nd_region);
[all …]
H A Dnd.h198 struct nd_region;
199 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event);
/openbmc/linux/drivers/dax/
H A Dpmem.c23 struct nd_region *nd_region = to_nd_region(dev->parent); in __dax_pmem_probe() local
56 nd_region->target_node, le32_to_cpu(pfn_sb->align), in __dax_pmem_probe()
/openbmc/linux/drivers/acpi/nfit/
H A Dnfit.h165 struct nd_region *nd_region; member
300 struct nd_region *nd_region; member
/openbmc/linux/tools/testing/nvdimm/test/
H A Dndtest.h67 struct nd_region *blk_region;
93 struct nd_region *region;
/openbmc/linux/drivers/cxl/
H A Dpmem.c291 static void unregister_nvdimm_region(void *nd_region) in unregister_nvdimm_region() argument
293 nvdimm_region_delete(nd_region); in unregister_nvdimm_region()
399 cxlr_pmem->nd_region = in cxl_pmem_region_probe()
401 if (!cxlr_pmem->nd_region) { in cxl_pmem_region_probe()
407 cxlr_pmem->nd_region); in cxl_pmem_region_probe()

12