/linux-6.1.9/drivers/nvdimm/ |
D | claim.c | 16 struct nd_namespace_common *ndns = *_ndns; in __nd_detach_ndns() local 19 if (!ndns) in __nd_detach_ndns() 22 nvdimm_bus = walk_to_nvdimm_bus(&ndns->dev); in __nd_detach_ndns() 24 dev_WARN_ONCE(dev, ndns->claim != dev, "%s: invalid claim\n", __func__); in __nd_detach_ndns() 25 ndns->claim = NULL; in __nd_detach_ndns() 27 put_device(&ndns->dev); in __nd_detach_ndns() 33 struct nd_namespace_common *ndns = *_ndns; in nd_detach_ndns() local 35 if (!ndns) in nd_detach_ndns() 37 get_device(&ndns->dev); in nd_detach_ndns() 38 nvdimm_bus_lock(&ndns->dev); in nd_detach_ndns() [all …]
|
D | btt_devs.c | 21 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release() 99 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show() 100 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show() 113 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store() 185 struct nd_namespace_common *ndns) in __nd_btt_create() argument 211 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create() 212 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create() 213 dev_name(ndns->claim)); in __nd_btt_create() 249 const uuid_t *ns_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid() 275 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, in nd_btt_version() argument [all …]
|
D | pfn_devs.c | 22 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release() 172 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show() 173 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show() 186 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store() 206 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local 208 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show() 232 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local 235 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show() 297 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument 309 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit() [all …]
|
D | dax_devs.c | 20 nd_detach_ndns(dev, &nd_pfn->ndns); in nd_dax_release() 87 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_dax_probe() argument 94 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_dax_probe() 96 if (ndns->force_raw) in nd_dax_probe() 99 switch (ndns->claim_class) { in nd_dax_probe() 107 nvdimm_bus_lock(&ndns->dev); in nd_dax_probe() 110 dax_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_dax_probe() 111 nvdimm_bus_unlock(&ndns->dev); in nd_dax_probe() 119 nd_detach_ndns(dax_dev, &nd_pfn->ndns); in nd_dax_probe()
|
D | namespace_devs.c | 90 struct nd_namespace_common *ndns = to_ndns(dev); in pmem_should_map_pages() local 102 if (ndns->force_raw) in pmem_should_map_pages() 115 unsigned int pmem_sector_size(struct nd_namespace_common *ndns) in pmem_sector_size() argument 117 if (is_namespace_pmem(&ndns->dev)) { in pmem_sector_size() 120 nspm = to_nd_namespace_pmem(&ndns->dev); in pmem_sector_size() 126 dev_WARN(&ndns->dev, "unsupported sector size: %ld\n", in pmem_sector_size() 138 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, in nvdimm_namespace_disk_name() argument 141 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() 144 if (ndns->claim && is_nd_btt(ndns->claim)) in nvdimm_namespace_disk_name() 147 if (is_namespace_pmem(&ndns->dev) || is_namespace_io(&ndns->dev)) { in nvdimm_namespace_disk_name() [all …]
|
D | pmem.c | 472 struct nd_namespace_common *ndns) in pmem_attach_disk() argument 474 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() 492 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); in pmem_attach_disk() 505 devm_namespace_disable(dev, ndns); in pmem_attach_disk() 517 dev_name(&ndns->dev))) { in pmem_attach_disk() 565 blk_queue_logical_block_size(q, pmem_sector_size(ndns)); in pmem_attach_disk() 573 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk() 623 struct nd_namespace_common *ndns; in nd_pmem_probe() local 625 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe() 626 if (IS_ERR(ndns)) in nd_pmem_probe() [all …]
|
D | nd.h | 450 struct nd_namespace_common *ndns; member 475 struct nd_namespace_common *ndns; member 543 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns); 548 struct nd_namespace_common *ndns) in nd_btt_probe() argument 569 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns); 573 struct nd_namespace_common *ndns); 578 struct nd_namespace_common *ndns) in nd_pfn_probe() argument 601 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); 606 struct nd_namespace_common *ndns) in nd_dax_probe() argument 638 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns); [all …]
|
D | btt.c | 41 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_read_bytes() local 45 return nvdimm_read_bytes(ndns, offset, buf, n, flags); in arena_read_bytes() 52 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_write_bytes() local 56 return nvdimm_write_bytes(ndns, offset, buf, n, flags); in arena_write_bytes() 975 const uuid_t *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout() 1518 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local 1525 nvdimm_namespace_disk_name(ndns, btt->btt_disk->disk_name); in btt_blk_init() 1598 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1659 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument 1661 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt() [all …]
|
D | bus.c | 942 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 954 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 956 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 958 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 960 if (!ndns) in nd_pmem_forget_poison_check() 963 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 965 nsio = to_nd_namespace_io(&ndns->dev); in nd_pmem_forget_poison_check()
|
D | btt.h | 236 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns,
|
D | nd-core.h | 135 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
|
D | region_devs.c | 854 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_advance_seeds() 861 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_advance_seeds() 868 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_advance_seeds()
|
D | label.c | 877 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() local 925 nsl_set_claim_class(ndd, nd_label, ndns->claim_class); in __pmem_label_update()
|
/linux-6.1.9/drivers/dax/ |
D | pmem.c | 21 struct nd_namespace_common *ndns; in __dax_pmem_probe() local 26 ndns = nvdimm_namespace_common_probe(dev); in __dax_pmem_probe() 27 if (IS_ERR(ndns)) in __dax_pmem_probe() 28 return ERR_CAST(ndns); in __dax_pmem_probe() 31 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); in __dax_pmem_probe() 37 devm_namespace_disable(dev, ndns); in __dax_pmem_probe() 42 nsio = to_nd_namespace_io(&ndns->dev); in __dax_pmem_probe() 44 dev_name(&ndns->dev))) { in __dax_pmem_probe() 49 rc = sscanf(dev_name(&ndns->dev), "namespace%d.%d", ®ion_id, &id); in __dax_pmem_probe()
|
/linux-6.1.9/include/linux/ |
D | nd.h | 168 static inline int nvdimm_read_bytes(struct nd_namespace_common *ndns, in nvdimm_read_bytes() argument 172 return ndns->rw_bytes(ndns, offset, buf, size, READ, flags); in nvdimm_read_bytes() 187 static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, in nvdimm_write_bytes() argument 191 return ndns->rw_bytes(ndns, offset, buf, size, WRITE, flags); in nvdimm_write_bytes()
|
/linux-6.1.9/Documentation/driver-api/nvdimm/ |
D | nvdimm.rst | 511 struct ndctl_namespace *ndns; 513 ndctl_namespace_foreach(region, ndns) 514 if (ndctl_namespace_get_id(ndns) == id) 515 return ndns; 532 struct ndctl_namespace *ndns, 540 ndctl_namespace_set_alt_name(ndns, devname); 542 ndctl_namespace_set_uuid(ndns, paramaters->uuid); 543 ndctl_namespace_set_size(ndns, paramaters->size); 546 ndctl_namespace_set_sector_size(ndns, parameters->lbasize); 547 ndctl_namespace_enable(ndns); [all …]
|