/Linux-v5.10/drivers/nvdimm/ |
D | claim.c | 15 struct nd_namespace_common *ndns = *_ndns; in __nd_detach_ndns() local 18 if (!ndns) in __nd_detach_ndns() 21 nvdimm_bus = walk_to_nvdimm_bus(&ndns->dev); in __nd_detach_ndns() 23 dev_WARN_ONCE(dev, ndns->claim != dev, "%s: invalid claim\n", __func__); in __nd_detach_ndns() 24 ndns->claim = NULL; in __nd_detach_ndns() 26 put_device(&ndns->dev); in __nd_detach_ndns() 32 struct nd_namespace_common *ndns = *_ndns; in nd_detach_ndns() local 34 if (!ndns) in nd_detach_ndns() 36 get_device(&ndns->dev); in nd_detach_ndns() 37 nvdimm_bus_lock(&ndns->dev); in nd_detach_ndns() [all …]
|
D | btt_devs.c | 22 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release() 100 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show() 101 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show() 114 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store() 184 struct nd_namespace_common *ndns) in __nd_btt_create() argument 209 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create() 210 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create() 211 dev_name(ndns->claim)); in __nd_btt_create() 247 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid() 271 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, in nd_btt_version() argument [all …]
|
D | pfn_devs.c | 23 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release() 173 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show() 174 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show() 187 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store() 207 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local 209 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show() 233 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local 236 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show() 296 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument 307 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit() [all …]
|
D | pmem.c | 372 struct nd_namespace_common *ndns) in pmem_attach_disk() argument 374 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() 394 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); in pmem_attach_disk() 407 devm_namespace_disable(dev, ndns); in pmem_attach_disk() 419 dev_name(&ndns->dev))) { in pmem_attach_disk() 466 blk_queue_logical_block_size(q, pmem_sector_size(ndns)); in pmem_attach_disk() 481 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk() 518 struct nd_namespace_common *ndns; in nd_pmem_probe() local 520 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe() 521 if (IS_ERR(ndns)) in nd_pmem_probe() [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 | 108 struct nd_namespace_common *ndns = to_ndns(dev); in pmem_should_map_pages() local 120 if (ndns->force_raw) in pmem_should_map_pages() 133 unsigned int pmem_sector_size(struct nd_namespace_common *ndns) in pmem_sector_size() argument 135 if (is_namespace_pmem(&ndns->dev)) { in pmem_sector_size() 138 nspm = to_nd_namespace_pmem(&ndns->dev); in pmem_sector_size() 144 dev_WARN(&ndns->dev, "unsupported sector size: %ld\n", in pmem_sector_size() 156 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, in nvdimm_namespace_disk_name() argument 159 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() 162 if (ndns->claim && is_nd_btt(ndns->claim)) in nvdimm_namespace_disk_name() 165 if (is_namespace_pmem(&ndns->dev) || is_namespace_io(&ndns->dev)) { in nvdimm_namespace_disk_name() [all …]
|
D | nd.h | 184 struct nd_namespace_common *ndns; member 209 struct nd_namespace_common *ndns; member 277 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns); 282 struct nd_namespace_common *ndns) in nd_btt_probe() argument 303 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns); 307 struct nd_namespace_common *ndns); 312 struct nd_namespace_common *ndns) in nd_pfn_probe() argument 335 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); 340 struct nd_namespace_common *ndns) in nd_dax_probe() argument 372 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns); [all …]
|
D | blk.c | 205 static int nsblk_rw_bytes(struct nd_namespace_common *ndns, in nsblk_rw_bytes() argument 209 struct nd_namespace_blk *nsblk = to_nd_namespace_blk(&ndns->dev); in nsblk_rw_bytes() 216 dev_WARN_ONCE(&ndns->dev, 1, "request out of range\n"); in nsblk_rw_bytes() 292 struct nd_namespace_common *ndns; in nd_blk_probe() local 295 ndns = nvdimm_namespace_common_probe(dev); in nd_blk_probe() 296 if (IS_ERR(ndns)) in nd_blk_probe() 297 return PTR_ERR(ndns); in nd_blk_probe() 299 nsblk = to_nd_namespace_blk(&ndns->dev); in nd_blk_probe() 300 nsblk->size = nvdimm_namespace_capacity(ndns); in nd_blk_probe() 303 ndns->rw_bytes = nsblk_rw_bytes; in nd_blk_probe() [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 u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout() 1521 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local 1534 nvdimm_namespace_disk_name(ndns, btt->btt_disk->disk_name); in btt_blk_init() 1606 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1667 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument 1669 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt() [all …]
|
D | bus.c | 939 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 951 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 953 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 955 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 957 if (!ndns) in nd_pmem_forget_poison_check() 960 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 962 nsio = to_nd_namespace_io(&ndns->dev); in nd_pmem_forget_poison_check()
|
D | btt.h | 237 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns,
|
D | label.c | 763 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() local 814 to_abstraction_guid(ndns->claim_class, in __pmem_label_update() 903 struct nd_namespace_common *ndns = &nsblk->common; in __blk_label_update() local 1042 to_abstraction_guid(ndns->claim_class, in __blk_label_update()
|
D | nd-core.h | 157 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
|
D | region_devs.c | 905 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_advance_seeds() 912 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_advance_seeds() 919 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_advance_seeds()
|
/Linux-v5.10/drivers/dax/pmem/ |
D | core.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-v5.10/include/linux/ |
D | nd.h | 141 static inline int nvdimm_read_bytes(struct nd_namespace_common *ndns, in nvdimm_read_bytes() argument 145 return ndns->rw_bytes(ndns, offset, buf, size, READ, flags); in nvdimm_read_bytes() 160 static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, in nvdimm_write_bytes() argument 164 return ndns->rw_bytes(ndns, offset, buf, size, WRITE, flags); in nvdimm_write_bytes()
|
/Linux-v5.10/Documentation/driver-api/nvdimm/ |
D | nvdimm.rst | 733 struct ndctl_namespace *ndns; 735 ndctl_namespace_foreach(region, ndns) 736 if (ndctl_namespace_get_id(ndns) == id) 737 return ndns; 754 struct ndctl_namespace *ndns, 762 ndctl_namespace_set_alt_name(ndns, devname); 764 ndctl_namespace_set_uuid(ndns, paramaters->uuid); 765 ndctl_namespace_set_size(ndns, paramaters->size); 768 ndctl_namespace_set_sector_size(ndns, parameters->lbasize); 769 ndctl_namespace_enable(ndns); [all …]
|