/Linux-v4.19/drivers/nvdimm/ |
D | claim.c | 23 struct nd_namespace_common *ndns = *_ndns; in __nd_detach_ndns() local 26 if (!ndns) in __nd_detach_ndns() 29 nvdimm_bus = walk_to_nvdimm_bus(&ndns->dev); in __nd_detach_ndns() 31 dev_WARN_ONCE(dev, ndns->claim != dev, "%s: invalid claim\n", __func__); in __nd_detach_ndns() 32 ndns->claim = NULL; in __nd_detach_ndns() 34 put_device(&ndns->dev); in __nd_detach_ndns() 40 struct nd_namespace_common *ndns = *_ndns; in nd_detach_ndns() local 42 if (!ndns) in nd_detach_ndns() 44 get_device(&ndns->dev); in nd_detach_ndns() 45 nvdimm_bus_lock(&ndns->dev); in nd_detach_ndns() [all …]
|
D | btt_devs.c | 30 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release() 119 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show() 120 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show() 133 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store() 183 struct nd_namespace_common *ndns) in __nd_btt_create() argument 208 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create() 209 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create() 210 dev_name(ndns->claim)); in __nd_btt_create() 239 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid() 263 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, in nd_btt_version() argument [all …]
|
D | pfn_devs.c | 31 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release() 189 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show() 190 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show() 203 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store() 223 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local 225 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show() 249 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local 252 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show() 305 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument 316 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit() [all …]
|
D | dax_devs.c | 28 nd_detach_ndns(dev, &nd_pfn->ndns); in nd_dax_release() 102 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_dax_probe() argument 109 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_dax_probe() 111 if (ndns->force_raw) in nd_dax_probe() 114 switch (ndns->claim_class) { in nd_dax_probe() 122 nvdimm_bus_lock(&ndns->dev); in nd_dax_probe() 125 dax_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_dax_probe() 126 nvdimm_bus_unlock(&ndns->dev); in nd_dax_probe() 134 nd_detach_ndns(dax_dev, &nd_pfn->ndns); in nd_dax_probe()
|
D | pmem.c | 349 struct nd_namespace_common *ndns) in pmem_attach_disk() argument 351 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() 391 dev_name(&ndns->dev))) { in pmem_attach_disk() 442 blk_queue_logical_block_size(q, pmem_sector_size(ndns)); in pmem_attach_disk() 458 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk() 493 struct nd_namespace_common *ndns; in nd_pmem_probe() local 495 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe() 496 if (IS_ERR(ndns)) in nd_pmem_probe() 497 return PTR_ERR(ndns); in nd_pmem_probe() 499 if (devm_nsio_enable(dev, to_nd_namespace_io(&ndns->dev))) in nd_pmem_probe() [all …]
|
D | namespace_devs.c | 162 unsigned int pmem_sector_size(struct nd_namespace_common *ndns) in pmem_sector_size() argument 164 if (is_namespace_pmem(&ndns->dev)) { in pmem_sector_size() 167 nspm = to_nd_namespace_pmem(&ndns->dev); in pmem_sector_size() 173 dev_WARN(&ndns->dev, "unsupported sector size: %ld\n", in pmem_sector_size() 185 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, in nvdimm_namespace_disk_name() argument 188 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() 191 if (ndns->claim && is_nd_btt(ndns->claim)) in nvdimm_namespace_disk_name() 194 if (is_namespace_pmem(&ndns->dev) || is_namespace_io(&ndns->dev)) { in nvdimm_namespace_disk_name() 197 if (is_namespace_pmem(&ndns->dev)) { in nvdimm_namespace_disk_name() 200 nspm = to_nd_namespace_pmem(&ndns->dev); in nvdimm_namespace_disk_name() [all …]
|
D | blk.c | 212 static int nsblk_rw_bytes(struct nd_namespace_common *ndns, in nsblk_rw_bytes() argument 216 struct nd_namespace_blk *nsblk = to_nd_namespace_blk(&ndns->dev); in nsblk_rw_bytes() 223 dev_WARN_ONCE(&ndns->dev, 1, "request out of range\n"); in nsblk_rw_bytes() 300 struct nd_namespace_common *ndns; in nd_blk_probe() local 303 ndns = nvdimm_namespace_common_probe(dev); in nd_blk_probe() 304 if (IS_ERR(ndns)) in nd_blk_probe() 305 return PTR_ERR(ndns); in nd_blk_probe() 307 nsblk = to_nd_namespace_blk(&ndns->dev); in nd_blk_probe() 308 nsblk->size = nvdimm_namespace_capacity(ndns); in nd_blk_probe() 311 ndns->rw_bytes = nsblk_rw_bytes; in nd_blk_probe() [all …]
|
D | nd.h | 186 struct nd_namespace_common *ndns; member 211 struct nd_namespace_common *ndns; member 260 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns); 265 struct nd_namespace_common *ndns) in nd_btt_probe() argument 290 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns); 294 struct nd_namespace_common *ndns); 299 struct nd_namespace_common *ndns) in nd_pfn_probe() argument 322 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); 327 struct nd_namespace_common *ndns) in nd_dax_probe() argument 359 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns); [all …]
|
D | btt.c | 49 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_read_bytes() local 53 return nvdimm_read_bytes(ndns, offset, buf, n, flags); in arena_read_bytes() 60 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_write_bytes() local 64 return nvdimm_write_bytes(ndns, offset, buf, n, flags); in arena_write_bytes() 974 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout() 1520 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local 1533 nvdimm_namespace_disk_name(ndns, btt->btt_disk->disk_name); in btt_blk_init() 1609 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1670 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument 1672 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt() [all …]
|
D | bus.c | 850 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 862 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 864 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 866 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 868 if (!ndns) in nd_pmem_forget_poison_check() 871 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 873 nsio = to_nd_namespace_io(&ndns->dev); in nd_pmem_forget_poison_check()
|
D | btt.h | 243 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns,
|
D | nd-core.h | 123 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
|
D | label.c | 630 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() local 681 to_abstraction_guid(ndns->claim_class, in __pmem_label_update() 778 struct nd_namespace_common *ndns = &nsblk->common; in __blk_label_update() local 918 to_abstraction_guid(ndns->claim_class, in __blk_label_update()
|
D | region_devs.c | 751 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_notify_driver_action() 762 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_notify_driver_action() 773 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_notify_driver_action()
|
/Linux-v4.19/drivers/dax/ |
D | pmem.c | 70 struct nd_namespace_common *ndns; in dax_pmem_probe() local 74 ndns = nvdimm_namespace_common_probe(dev); in dax_pmem_probe() 75 if (IS_ERR(ndns)) in dax_pmem_probe() 76 return PTR_ERR(ndns); in dax_pmem_probe() 77 nsio = to_nd_namespace_io(&ndns->dev); in dax_pmem_probe() 96 dev_name(&ndns->dev))) { in dax_pmem_probe() 131 rc = sscanf(dev_name(&ndns->dev), "namespace%d.%d", ®ion_id, &id); in dax_pmem_probe()
|
/Linux-v4.19/include/linux/ |
D | nd.h | 149 static inline int nvdimm_read_bytes(struct nd_namespace_common *ndns, in nvdimm_read_bytes() argument 153 return ndns->rw_bytes(ndns, offset, buf, size, READ, flags); in nvdimm_read_bytes() 168 static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, in nvdimm_write_bytes() argument 172 return ndns->rw_bytes(ndns, offset, buf, size, WRITE, flags); in nvdimm_write_bytes()
|
/Linux-v4.19/Documentation/nvdimm/ |
D | nvdimm.txt | 667 struct ndctl_namespace *ndns; 669 ndctl_namespace_foreach(region, ndns) 670 if (ndctl_namespace_get_id(ndns) == id) 671 return ndns; 686 struct ndctl_namespace *ndns, 694 ndctl_namespace_set_alt_name(ndns, devname); 696 ndctl_namespace_set_uuid(ndns, paramaters->uuid); 697 ndctl_namespace_set_size(ndns, paramaters->size); 700 ndctl_namespace_set_sector_size(ndns, parameters->lbasize); 701 ndctl_namespace_enable(ndns); [all …]
|