/kernel/linux/linux-5.10/drivers/nvdimm/ |
H A D | region_devs.c | 62 int nd_region_activate(struct nd_region *nd_region) in nd_region_activate() argument 66 struct device *dev = &nd_region->dev; in nd_region_activate() 69 nvdimm_bus_lock(&nd_region->dev); in nd_region_activate() 70 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_activate() 71 struct nd_mapping *nd_mapping = &nd_region->mapping[i]; in nd_region_activate() 75 nvdimm_bus_unlock(&nd_region->dev); in nd_region_activate() 86 nvdimm_bus_unlock(&nd_region->dev); in nd_region_activate() 97 for (i = 0; i < nd_region->ndr_mappings; i++) { in nd_region_activate() 98 struct nd_mapping *nd_mapping = &nd_region in nd_region_activate() 126 struct nd_region *nd_region = to_nd_region(dev); nd_region_release() local 145 struct nd_region *nd_region = container_of(dev, struct nd_region, dev); to_nd_region() local 152 nd_region_dev(struct nd_region *nd_region) nd_region_dev() argument 162 struct nd_region *nd_region = to_nd_region(dev); to_nd_blk_region() local 169 nd_region_provider_data(struct nd_region *nd_region) nd_region_provider_data() argument 195 nd_region_to_nstype(struct nd_region *nd_region) nd_region_to_nstype() argument 219 region_size(struct nd_region *nd_region) region_size() argument 235 struct nd_region *nd_region = to_nd_region(dev); size_show() local 244 struct nd_region *nd_region = to_nd_region(dev); deep_flush_show() local 258 struct nd_region *nd_region = to_nd_region(dev); deep_flush_store() local 275 struct nd_region *nd_region = to_nd_region(dev); mappings_show() local 284 struct nd_region *nd_region = to_nd_region(dev); nstype_show() local 293 struct nd_region *nd_region = to_nd_region(dev); set_cookie_show() local 333 nd_region_available_dpa(struct nd_region *nd_region) nd_region_available_dpa() argument 365 nd_region_allocatable_dpa(struct nd_region *nd_region) nd_region_allocatable_dpa() argument 392 struct nd_region *nd_region = to_nd_region(dev); available_size_show() local 415 struct nd_region *nd_region = to_nd_region(dev); max_available_extent_show() local 449 struct nd_region *nd_region = to_nd_region(dev); namespace_seed_show() local 465 struct nd_region *nd_region = to_nd_region(dev); btt_seed_show() local 482 struct nd_region *nd_region = to_nd_region(dev); pfn_seed_show() local 499 struct nd_region *nd_region = to_nd_region(dev); dax_seed_show() local 516 struct nd_region *nd_region = to_nd_region(dev); read_only_show() local 526 struct nd_region *nd_region = to_nd_region(dev); read_only_store() local 539 struct nd_region *nd_region = to_nd_region(dev); align_show() local 547 struct nd_region *nd_region = to_nd_region(dev); align_store() local 587 struct nd_region *nd_region = to_nd_region(dev); region_badblocks_show() local 604 struct nd_region *nd_region = to_nd_region(dev); resource_show() local 613 struct nd_region *nd_region = to_nd_region(dev); persistence_domain_show() local 648 struct nd_region *nd_region = to_nd_region(dev); region_visible() local 701 struct nd_region *nd_region = to_nd_region(dev); mappingN() local 763 struct nd_region *nd_region = to_nd_region(dev); mapping_visible() local 857 nd_region_interleave_set_cookie(struct nd_region *nd_region, struct nd_namespace_index *nsindex) nd_region_interleave_set_cookie() argument 871 nd_region_interleave_set_altcookie(struct nd_region *nd_region) nd_region_interleave_set_altcookie() argument 895 nd_region_advance_seeds(struct nd_region *nd_region, struct device *dev) nd_region_advance_seeds() argument 925 nd_blk_region_init(struct nd_region *nd_region) nd_blk_region_init() argument 958 nd_region_acquire_lane(struct nd_region *nd_region) nd_region_acquire_lane() argument 979 nd_region_release_lane(struct nd_region *nd_region, unsigned int lane) nd_region_release_lane() argument 1000 default_align(struct nd_region *nd_region) default_align() argument 1036 struct nd_region *nd_region; nd_region_create() local 1182 nvdimm_flush(struct nd_region *nd_region, struct bio *bio) nvdimm_flush() argument 1199 generic_nvdimm_flush(struct nd_region *nd_region) generic_nvdimm_flush() argument 1236 nvdimm_has_flush(struct nd_region *nd_region) nvdimm_has_flush() argument 1267 nvdimm_has_cache(struct nd_region *nd_region) nvdimm_has_cache() argument 1274 is_nvdimm_sync(struct nd_region *nd_region) is_nvdimm_sync() argument 1285 struct nd_region *nd_region; global() member 1291 struct nd_region *nd_region; region_conflict() local 1312 nd_region_conflict(struct nd_region *nd_region, resource_size_t start, resource_size_t size) nd_region_conflict() argument [all...] |
H A D | region.c | 17 struct nd_region *nd_region = to_nd_region(dev); in nd_region_probe() local 19 if (nd_region->num_lanes > num_online_cpus() in nd_region_probe() 20 && nd_region->num_lanes < num_possible_cpus() in nd_region_probe() 23 num_online_cpus(), nd_region->num_lanes, in nd_region_probe() 26 nd_region->num_lanes); in nd_region_probe() 29 rc = nd_region_activate(nd_region); in nd_region_probe() 33 rc = nd_blk_region_init(nd_region); in nd_region_probe() 37 if (is_memory(&nd_region->dev)) { in nd_region_probe() 39 .start = nd_region in nd_region_probe() 92 struct nd_region *nd_region = to_nd_region(dev); nd_region_remove() local 124 struct nd_region *nd_region = to_nd_region(dev); nd_region_notify() local [all...] |
H A D | namespace_devs.c | 26 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_pmem_release() local 29 ida_simple_remove(&nd_region->ns_ida, nspm->id); in namespace_pmem_release() 38 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_blk_release() local 41 ida_simple_remove(&nd_region->ns_ida, nsblk->id); in namespace_blk_release() 107 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local 114 if (!test_bit(ND_REGION_PAGEMAP, &nd_region->flags)) in pmem_should_map_pages() 159 struct nd_region *nd_regio in nvdimm_namespace_disk_name() local 218 struct nd_region *nd_region = to_nd_region(dev->parent); nstype_show() local 271 struct nd_region *nd_region = to_nd_region(nsblk->common.dev.parent); nd_namespace_blk_size() local 289 struct nd_region *nd_region = to_nd_region(nsblk->common.dev.parent); __nd_namespace_blk_validate() local 346 nd_namespace_label_update(struct nd_region *nd_region, struct device *dev) nd_namespace_label_update() argument 385 struct nd_region *nd_region = to_nd_region(dev->parent); alt_name_store() local 421 scan_free(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_label_id *label_id, resource_size_t n) scan_free() argument 479 shrink_dpa_allocation(struct nd_region *nd_region, struct nd_label_id *label_id, resource_size_t n) shrink_dpa_allocation() argument 496 init_dpa_allocation(struct nd_label_id *label_id, struct nd_region *nd_region, struct nd_mapping *nd_mapping, resource_size_t n) init_dpa_allocation() argument 538 space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, struct nd_label_id *label_id, struct resource *prev, struct resource *next, struct resource *exist, resource_size_t n, struct resource *valid) space_valid() argument 594 scan_allocate(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_label_id *label_id, resource_size_t n) scan_allocate() argument 746 merge_dpa(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_label_id *label_id) merge_dpa() argument 780 struct nd_region *nd_region; __reserve_free_pmem() local 851 grow_dpa_allocation(struct nd_region *nd_region, struct nd_label_id *label_id, resource_size_t n) grow_dpa_allocation() argument 900 nd_namespace_pmem_set_resource(struct nd_region *nd_region, struct nd_namespace_pmem *nspm, resource_size_t size) nd_namespace_pmem_set_resource() argument 953 struct nd_region *nd_region = to_nd_region(dev->parent); __size_store() local 1051 struct nd_region *nd_region = to_nd_region(dev->parent); size_store() local 1127 struct nd_region *nd_region = to_nd_region(dev->parent); nvdimm_namespace_locked() local 1183 namespace_update_uuid(struct nd_region *nd_region, struct device *dev, u8 *new_uuid, u8 **old_uuid) namespace_update_uuid() argument 1253 struct nd_region *nd_region = to_nd_region(dev->parent); uuid_store() local 1341 struct nd_region *nd_region = to_nd_region(dev->parent); sector_size_store() local 1379 struct nd_region *nd_region = to_nd_region(dev->parent); dpa_extents_show() local 1420 struct nd_region *nd_region = to_nd_region(dev->parent); btt_claim_class() local 1521 struct nd_region *nd_region = to_nd_region(dev->parent); holder_class_store() local 1805 create_namespace_io(struct nd_region *nd_region) create_namespace_io() argument 1834 has_uuid_at_pos(struct nd_region *nd_region, u8 *uuid, u64 cookie, u16 pos) has_uuid_at_pos() argument 1891 select_pmem_id(struct nd_region *nd_region, u8 *pmem_id) select_pmem_id() argument 1949 create_namespace_pmem(struct nd_region *nd_region, struct nd_namespace_index *nsindex, struct nd_namespace_label *nd_label) create_namespace_pmem() argument 2080 nsblk_add_resource(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, struct nd_namespace_blk *nsblk, resource_size_t start) nsblk_add_resource() argument 2103 nd_namespace_blk_create(struct nd_region *nd_region) nd_namespace_blk_create() argument 2128 nd_namespace_pmem_create(struct nd_region *nd_region) nd_namespace_pmem_create() argument 2159 nd_region_create_ns_seed(struct nd_region *nd_region) nd_region_create_ns_seed() argument 2182 nd_region_create_dax_seed(struct nd_region *nd_region) nd_region_create_dax_seed() argument 2194 nd_region_create_pfn_seed(struct nd_region *nd_region) nd_region_create_pfn_seed() argument 2206 nd_region_create_btt_seed(struct nd_region *nd_region) nd_region_create_btt_seed() argument 2218 add_namespace_resource(struct nd_region *nd_region, struct nd_namespace_label *nd_label, struct device **devs, int count) add_namespace_resource() argument 2256 create_namespace_blk(struct nd_region *nd_region, struct nd_namespace_label *nd_label, int count) create_namespace_blk() argument 2342 scan_labels(struct nd_region *nd_region) scan_labels() argument 2480 create_namespaces(struct nd_region *nd_region) create_namespaces() argument 2509 struct nd_region *nd_region = region; deactivate_labels() local 2528 init_active_labels(struct nd_region *nd_region) init_active_labels() argument 2603 nd_region_register_namespaces(struct nd_region *nd_region, int *err) nd_region_register_namespaces() argument [all...] |
H 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 94 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); nd_dax_probe() local [all...] |
H A D | nd-core.h | 118 struct nd_region; 119 void nd_region_advance_seeds(struct nd_region *nd_region, struct device *dev); 120 void nd_region_create_ns_seed(struct nd_region *nd_region); 121 void nd_region_create_btt_seed(struct nd_region *nd_region); 122 void nd_region_create_pfn_seed(struct nd_region *nd_region); 123 void nd_region_create_dax_seed(struct nd_region *nd_regio [all...] |
H A D | nd.h | 138 struct nd_region { struct 159 int (*flush)(struct nd_region *nd_region, struct bio *bio); 168 struct nd_region nd_region; member 279 struct device *nd_btt_create(struct nd_region *nd_region); 292 static inline struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument 305 struct device *nd_pfn_create(struct nd_region *nd_regio 322 nd_pfn_create(struct nd_region *nd_region) nd_pfn_create() argument 350 nd_dax_create(struct nd_region *nd_region) nd_dax_create() argument [all...] |
H A D | btt_devs.c | 18 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_btt_release() local 23 ida_simple_remove(&nd_region->btt_ida, nd_btt->id); in nd_btt_release() 182 static struct device *__nd_btt_create(struct nd_region *nd_region, in __nd_btt_create() argument 193 nd_btt->id = ida_simple_get(&nd_region->btt_ida, 0, 0, GFP_KERNEL); in __nd_btt_create() 205 dev_set_name(dev, "btt%d.%d", nd_region->id, nd_btt->id); in __nd_btt_create() 206 dev->parent = &nd_region->dev; in __nd_btt_create() 218 ida_simple_remove(&nd_region->btt_ida, nd_btt->id); in __nd_btt_create() 225 struct device *nd_btt_create(struct nd_region *nd_regio argument 336 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); nd_btt_probe() local [all...] |
H A D | dimm_devs.c | 216 struct nd_region *nd_region = &ndbr->nd_region; in nd_blk_region_to_dimm() local 217 struct nd_mapping *nd_mapping = &nd_region->mapping[0]; in nd_blk_region_to_dimm() 696 static unsigned long dpa_align(struct nd_region *nd_region) in dpa_align() argument 698 struct device *dev = &nd_region->dev; in dpa_align() 703 if (dev_WARN_ONCE(dev, !nd_region->ndr_mappings || nd_region->align in dpa_align() 704 % nd_region in dpa_align() 716 struct nd_region *nd_region; alias_dpa_busy() local 800 nd_blk_available_dpa(struct nd_region *nd_region) nd_blk_available_dpa() argument 844 nd_pmem_max_contiguous_dpa(struct nd_region *nd_region, struct nd_mapping *nd_mapping) nd_pmem_max_contiguous_dpa() argument 896 nd_pmem_available_dpa(struct nd_region *nd_region, struct nd_mapping *nd_mapping, resource_size_t *overlap) nd_pmem_available_dpa() argument [all...] |
H A D | label.h | 139 struct nd_region; 142 int nd_pmem_namespace_label_update(struct nd_region *nd_region, 144 int nd_blk_namespace_label_update(struct nd_region *nd_region,
|
H 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 105 * parent bio. Otherwise directly call nd_region flush. in async_pmem_flush() 119 if (virtio_pmem_flush(nd_region)) in async_pmem_flush()
|
H A D | virtio_pmem.c | 36 struct nd_region *nd_region; in virtio_pmem_probe() local 86 nd_region = nvdimm_pmem_region_create(vpmem->nvdimm_bus, &ndr_desc); in virtio_pmem_probe() 87 if (!nd_region) { in virtio_pmem_probe() 92 nd_region->provider_data = dev_to_virtio(nd_region->dev.parent->parent); in virtio_pmem_probe()
|
H A D | pfn_devs.c | 19 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local 24 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release() 316 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument 325 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL); in nd_pfn_alloc() 332 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in nd_pfn_alloc() 334 dev->parent = &nd_region->dev; in nd_pfn_alloc() 339 struct device *nd_pfn_create(struct nd_region *nd_region) in nd_pfn_create() argument 362 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent); nd_pfn_clear_memmap_errors() local 619 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); nd_pfn_probe() local 723 struct nd_region *nd_region; nd_pfn_init() local [all...] |
H A D | pmem.c | 42 static struct nd_region *to_region(struct pmem_device *pmem) in to_region() 201 struct nd_region *nd_region = to_region(pmem); in pmem_submit_bio() local 204 ret = nvdimm_flush(nd_region, bio); in pmem_submit_bio() 225 ret = nvdimm_flush(nd_region, bio); in pmem_submit_bio() 375 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_attach_disk() local 412 fua = nvdimm_has_flush(nd_region); in pmem_attach_disk() 486 nvdimm_badblocks_populate(nd_region, &pmem->bb, &bb_range); in pmem_attach_disk() 489 if (is_nvdimm_sync(nd_region)) in pmem_attach_disk() 593 struct nd_region *nd_region; nd_pmem_notify() local [all...] |
/kernel/linux/linux-6.6/drivers/nvdimm/ |
H A D | region_devs.c | 63 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 int nd_region_activate(struct nd_region *nd_region) in nd_region_activate() argument 173 struct nd_region *nd_region = to_nd_region(dev); nd_region_release() local 190 struct nd_region *nd_region = container_of(dev, struct nd_region, dev); to_nd_region() local 197 nd_region_dev(struct nd_region *nd_region) nd_region_dev() argument 205 nd_region_provider_data(struct nd_region *nd_region) nd_region_provider_data() argument 219 nd_region_to_nstype(struct nd_region *nd_region) nd_region_to_nstype() argument 241 region_size(struct nd_region *nd_region) region_size() argument 257 struct nd_region *nd_region = to_nd_region(dev); size_show() local 266 struct nd_region *nd_region = to_nd_region(dev); deep_flush_show() local 280 struct nd_region *nd_region = to_nd_region(dev); deep_flush_store() local 297 struct nd_region *nd_region = to_nd_region(dev); mappings_show() local 306 struct nd_region *nd_region = to_nd_region(dev); nstype_show() local 315 struct nd_region *nd_region = to_nd_region(dev); set_cookie_show() local 355 nd_region_available_dpa(struct nd_region *nd_region) nd_region_available_dpa() argument 377 nd_region_allocatable_dpa(struct nd_region *nd_region) nd_region_allocatable_dpa() argument 395 struct nd_region *nd_region = to_nd_region(dev); available_size_show() local 418 struct nd_region *nd_region = to_nd_region(dev); max_available_extent_show() local 452 struct nd_region *nd_region = to_nd_region(dev); namespace_seed_show() local 468 struct nd_region *nd_region = to_nd_region(dev); btt_seed_show() local 485 struct nd_region *nd_region = to_nd_region(dev); pfn_seed_show() local 502 struct nd_region *nd_region = to_nd_region(dev); dax_seed_show() local 519 struct nd_region *nd_region = to_nd_region(dev); read_only_show() local 535 struct nd_region *nd_region = to_nd_region(dev); read_only_store() local 549 struct nd_region *nd_region = to_nd_region(dev); align_show() local 557 struct nd_region *nd_region = to_nd_region(dev); align_store() local 595 struct nd_region *nd_region = to_nd_region(dev); region_badblocks_show() local 612 struct nd_region *nd_region = to_nd_region(dev); resource_show() local 621 struct nd_region *nd_region = to_nd_region(dev); persistence_domain_show() local 656 struct nd_region *nd_region = to_nd_region(dev); region_visible() local 708 struct nd_region *nd_region = to_nd_region(dev); mappingN() local 770 struct nd_region *nd_region = to_nd_region(dev); mapping_visible() local 853 nd_region_interleave_set_cookie(struct nd_region *nd_region, struct nd_namespace_index *nsindex) nd_region_interleave_set_cookie() argument 867 nd_region_interleave_set_altcookie(struct nd_region *nd_region) nd_region_interleave_set_altcookie() argument 891 nd_region_advance_seeds(struct nd_region *nd_region, struct device *dev) nd_region_advance_seeds() argument 938 nd_region_acquire_lane(struct nd_region *nd_region) nd_region_acquire_lane() argument 959 nd_region_release_lane(struct nd_region *nd_region, unsigned int lane) nd_region_release_lane() argument 980 default_align(struct nd_region *nd_region) default_align() argument 1004 struct nd_region *nd_region; nd_region_create() local 1123 nvdimm_region_delete(struct nd_region *nd_region) nvdimm_region_delete() argument 1130 nvdimm_flush(struct nd_region *nd_region, struct bio *bio) nvdimm_flush() argument 1147 generic_nvdimm_flush(struct nd_region *nd_region) generic_nvdimm_flush() argument 1184 nvdimm_has_flush(struct nd_region *nd_region) nvdimm_has_flush() argument 1215 nvdimm_has_cache(struct nd_region *nd_region) nvdimm_has_cache() argument 1222 is_nvdimm_sync(struct nd_region *nd_region) is_nvdimm_sync() argument 1233 struct nd_region *nd_region; global() member 1239 struct nd_region *nd_region; region_conflict() local 1260 nd_region_conflict(struct nd_region *nd_region, resource_size_t start, resource_size_t size) nd_region_conflict() argument [all...] |
H A D | region.c | 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() 85 struct nd_region *nd_region = to_nd_region(dev); nd_region_remove() local 125 struct nd_region *nd_region = to_nd_region(dev); nd_region_notify() local [all...] |
H A D | namespace_devs.c | 27 struct nd_region *nd_region = to_nd_region(dev->parent); in namespace_pmem_release() local 30 ida_simple_remove(&nd_region->ns_ida, nspm->id); in namespace_pmem_release() 90 struct nd_region *nd_region = to_nd_region(dev->parent); in pmem_should_map_pages() local 97 if (!test_bit(ND_REGION_PAGEMAP, &nd_region->flags)) in pmem_should_map_pages() 142 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() local 159 sprintf(name, "pmem%d.%d%s", nd_region->id, nsidx, in nvdimm_namespace_disk_name() 162 sprintf(name, "pmem%d%s", nd_region in nvdimm_namespace_disk_name() 186 struct nd_region *nd_region = to_nd_region(dev->parent); nstype_show() local 233 nd_namespace_label_update(struct nd_region *nd_region, struct device *dev) nd_namespace_label_update() argument 262 struct nd_region *nd_region = to_nd_region(dev->parent); alt_name_store() local 294 scan_free(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_label_id *label_id, resource_size_t n) scan_free() argument 341 shrink_dpa_allocation(struct nd_region *nd_region, struct nd_label_id *label_id, resource_size_t n) shrink_dpa_allocation() argument 358 init_dpa_allocation(struct nd_label_id *label_id, struct nd_region *nd_region, struct nd_mapping *nd_mapping, resource_size_t n) init_dpa_allocation() argument 392 space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd, struct nd_label_id *label_id, struct resource *prev, struct resource *next, struct resource *exist, resource_size_t n, struct resource *valid) space_valid() argument 432 scan_allocate(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_label_id *label_id, resource_size_t n) scan_allocate() argument 574 merge_dpa(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_label_id *label_id) merge_dpa() argument 608 struct nd_region *nd_region; __reserve_free_pmem() local 666 grow_dpa_allocation(struct nd_region *nd_region, struct nd_label_id *label_id, resource_size_t n) grow_dpa_allocation() argument 692 nd_namespace_pmem_set_resource(struct nd_region *nd_region, struct nd_namespace_pmem *nspm, resource_size_t size) nd_namespace_pmem_set_resource() argument 746 struct nd_region *nd_region = to_nd_region(dev->parent); __size_store() local 838 struct nd_region *nd_region = to_nd_region(dev->parent); size_store() local 903 struct nd_region *nd_region = to_nd_region(dev->parent); nvdimm_namespace_locked() local 955 namespace_update_uuid(struct nd_region *nd_region, struct device *dev, uuid_t *new_uuid, uuid_t **old_uuid) namespace_update_uuid() argument 1027 struct nd_region *nd_region = to_nd_region(dev->parent); uuid_store() local 1101 struct nd_region *nd_region = to_nd_region(dev->parent); sector_size_store() local 1134 struct nd_region *nd_region = to_nd_region(dev->parent); dpa_extents_show() local 1170 struct nd_region *nd_region = to_nd_region(dev->parent); btt_claim_class() local 1271 struct nd_region *nd_region = to_nd_region(dev->parent); holder_class_store() local 1525 create_namespace_io(struct nd_region *nd_region) create_namespace_io() argument 1554 has_uuid_at_pos(struct nd_region *nd_region, const uuid_t *uuid, u64 cookie, u16 pos) has_uuid_at_pos() argument 1603 select_pmem_id(struct nd_region *nd_region, const uuid_t *pmem_id) select_pmem_id() argument 1662 create_namespace_pmem(struct nd_region *nd_region, struct nd_mapping *nd_mapping, struct nd_namespace_label *nd_label) create_namespace_pmem() argument 1793 nd_namespace_pmem_create(struct nd_region *nd_region) nd_namespace_pmem_create() argument 1826 nd_region_create_ns_seed(struct nd_region *nd_region) nd_region_create_ns_seed() argument 1849 nd_region_create_dax_seed(struct nd_region *nd_region) nd_region_create_dax_seed() argument 1861 nd_region_create_pfn_seed(struct nd_region *nd_region) nd_region_create_pfn_seed() argument 1873 nd_region_create_btt_seed(struct nd_region *nd_region) nd_region_create_btt_seed() argument 1885 add_namespace_resource(struct nd_region *nd_region, struct nd_namespace_label *nd_label, struct device **devs, int count) add_namespace_resource() argument 1927 scan_labels(struct nd_region *nd_region) scan_labels() argument 2037 create_namespaces(struct nd_region *nd_region) create_namespaces() argument 2066 struct nd_region *nd_region = region; deactivate_labels() local 2085 init_active_labels(struct nd_region *nd_region) init_active_labels() argument 2154 nd_region_register_namespaces(struct nd_region *nd_region, int *err) nd_region_register_namespaces() argument [all...] |
H A D | nd-core.h | 100 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_regio [all...] |
H 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 94 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); nd_dax_probe() local [all...] |
H A D | nd.h | 403 struct nd_region { struct 424 int (*flush)(struct nd_region *nd_region, struct bio *bio); 428 static inline bool nsl_validate_nlabel(struct nd_region *nd_region, in nsl_validate_nlabel() argument 434 return nsl_get_nlabel(ndd, nd_label) == nd_region->ndr_mappings; in nsl_validate_nlabel() 545 struct device *nd_btt_create(struct nd_region *nd_region); 558 static inline struct device *nd_btt_create(struct nd_region *nd_region) in nd_btt_create() argument 588 nd_pfn_create(struct nd_region *nd_region) nd_pfn_create() argument 616 nd_dax_create(struct nd_region *nd_region) nd_dax_create() argument [all...] |
H 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_regio argument 340 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); nd_btt_probe() local [all...] |
H 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 105 * parent bio. Otherwise directly call nd_region flush. in async_pmem_flush() 120 if (virtio_pmem_flush(nd_region)) in async_pmem_flush()
|
H A D | pfn_devs.c | 20 struct nd_region *nd_region = to_nd_region(dev->parent); in nd_pfn_release() local 25 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release() 320 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region) in nd_pfn_alloc() argument 329 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL); in nd_pfn_alloc() 336 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id); in nd_pfn_alloc() 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 366 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent); nd_pfn_clear_memmap_errors() local 628 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); nd_pfn_probe() local 732 struct nd_region *nd_region; nd_pfn_init() local [all...] |
H A D | bus.c | 148 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 in nvdimm_clear_badblocks_region() 626 struct nd_region *nd_region = to_nd_region(dev->parent); nvdimm_check_and_set_ro() local 678 struct nd_region *nd_region = NULL; nvdimm_dev_to_target_node() local [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | libnvdimm.h | 124 struct nd_region; 138 int (*flush)(struct nd_region *nd_region, struct bio *bio); 253 struct nd_region *to_nd_region(struct device *dev); 254 struct device *nd_region_dev(struct nd_region *nd_region); 276 void nvdimm_region_delete(struct nd_region *nd_region); 286 struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus, 288 struct nd_region *nvdimm_blk_region_creat [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | libnvdimm.h | 117 struct nd_region; 130 int (*flush)(struct nd_region *nd_region, struct bio *bio); 259 struct nd_region *to_nd_region(struct device *dev); 260 struct device *nd_region_dev(struct nd_region *nd_region); 291 struct nd_region *nvdimm_pmem_region_create(struct nvdimm_bus *nvdimm_bus, 293 struct nd_region *nvdimm_blk_region_create(struct nvdimm_bus *nvdimm_bus, 295 struct nd_region *nvdimm_volatile_region_create(struct nvdimm_bus *nvdimm_bus, 297 void *nd_region_provider_data(struct nd_region *nd_regio [all...] |