/linux-6.3-rc2/drivers/nvdimm/ |
A D | region_devs.c | 104 int nd_region_activate(struct nd_region *nd_region) in nd_region_activate() argument 172 struct nd_region *nd_region = to_nd_region(dev); in nd_region_release() local 189 struct nd_region *nd_region = container_of(dev, struct nd_region, dev); in to_nd_region() local 256 struct nd_region *nd_region = to_nd_region(dev); in size_show() local 1003 struct nd_region *nd_region; in nd_region_create() local 1084 nd_region->align = default_align(nd_region); in nd_region_create() 1136 if (nd_region->flush(nd_region, bio)) in nvdimm_flush() 1232 struct nd_region *nd_region; member 1238 struct nd_region *nd_region; in region_conflict() local 1246 if (nd_region == ctx->nd_region) in region_conflict() [all …]
|
A D | region.c | 18 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 …]
|
A D | namespace_devs.c | 26 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_pmem_release() local 89 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local 185 struct nd_region *nd_region = to_nd_region(dev->parent); in nstype_show() local 293 static int scan_free(struct nd_region *nd_region, in scan_free() argument 399 align = nd_region->align / nd_region->ndr_mappings; in space_valid() 573 static int merge_dpa(struct nd_region *nd_region, in merge_dpa() argument 607 struct nd_region *nd_region; in __reserve_free_pmem() local 1851 nd_region->dax_seed = nd_dax_create(nd_region); in nd_region_create_dax_seed() 1863 nd_region->pfn_seed = nd_pfn_create(nd_region); in nd_region_create_pfn_seed() 1875 nd_region->btt_seed = nd_btt_create(nd_region); in nd_region_create_btt_seed() [all …]
|
A D | nd-core.h | 100 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 …]
|
A D | dax_devs.c | 15 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 …]
|
A D | nd.h | 403 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 …]
|
A D | btt_devs.c | 17 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 …]
|
A D | pfn_devs.c | 20 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 623 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe() local 727 struct nd_region *nd_region; in nd_pfn_init() local 756 if (nd_region->ro) { in nd_pfn_init() [all …]
|
A D | nd_virtio.c | 38 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 119 if (virtio_pmem_flush(nd_region)) in async_pmem_flush()
|
A D | bus.c | 148 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 …]
|
A D | dimm_devs.c | 705 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 …]
|
A D | pmem.c | 43 static struct nd_region *to_region(struct pmem_device *pmem) in to_region() 209 struct nd_region *nd_region = to_region(pmem); in pmem_submit_bio() local 212 ret = nvdimm_flush(nd_region, bio); in pmem_submit_bio() 233 ret = nvdimm_flush(nd_region, bio); in pmem_submit_bio() 452 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_attach_disk() local 487 fua = nvdimm_has_flush(nd_region); in pmem_attach_disk() 566 if (is_nvdimm_sync(nd_region)) in pmem_attach_disk() 674 struct nd_region *nd_region; in pmem_revalidate_poison() local 686 nd_region = to_nd_region(ndns->dev.parent); in pmem_revalidate_poison() 693 nd_region = to_region(pmem); in pmem_revalidate_poison() [all …]
|
A D | virtio_pmem.c | 35 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()
|
A D | label.c | 409 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 …]
|
A D | badrange.c | 269 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()
|
A D | virtio_pmem.h | 54 int async_pmem_flush(struct nd_region *nd_region, struct bio *bio);
|
A D | label.h | 222 struct nd_region; 224 int nd_pmem_namespace_label_update(struct nd_region *nd_region,
|
A D | claim.c | 79 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()
|
A D | btt.c | 1207 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 …]
|
/linux-6.3-rc2/include/linux/ |
A D | libnvdimm.h | 124 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 …]
|
A D | nd.h | 198 struct nd_region; 199 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event);
|
/linux-6.3-rc2/drivers/dax/ |
A D | pmem.c | 24 struct nd_region *nd_region = to_nd_region(dev->parent); in __dax_pmem_probe() local 57 nd_region->target_node, le32_to_cpu(pfn_sb->align), in __dax_pmem_probe()
|
/linux-6.3-rc2/drivers/acpi/nfit/ |
A D | nfit.h | 165 struct nd_region *nd_region; member 300 struct nd_region *nd_region; member
|
/linux-6.3-rc2/tools/testing/nvdimm/test/ |
A D | ndtest.h | 67 struct nd_region *blk_region; 93 struct nd_region *region;
|
/linux-6.3-rc2/drivers/cxl/ |
A D | pmem.c | 290 static void unregister_nvdimm_region(void *nd_region) in unregister_nvdimm_region() argument 292 nvdimm_region_delete(nd_region); in unregister_nvdimm_region() 398 cxlr_pmem->nd_region = in cxl_pmem_region_probe() 400 if (!cxlr_pmem->nd_region) { in cxl_pmem_region_probe() 406 cxlr_pmem->nd_region); in cxl_pmem_region_probe()
|