/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() 111 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show() 112 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show() 125 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store() 183 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() 184 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show() 185 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show() 198 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store() 218 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local 220 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show() 244 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local 247 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show() 303 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument 314 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit() [all …]
|
D | pmem.c | 353 struct nd_namespace_common *ndns) in pmem_attach_disk() argument 355 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() 396 dev_name(&ndns->dev))) { in pmem_attach_disk() 441 blk_queue_logical_block_size(q, pmem_sector_size(ndns)); in pmem_attach_disk() 457 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk() 494 struct nd_namespace_common *ndns; in nd_pmem_probe() local 496 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe() 497 if (IS_ERR(ndns)) in nd_pmem_probe() 498 return PTR_ERR(ndns); in nd_pmem_probe() 500 if (devm_nsio_enable(dev, to_nd_namespace_io(&ndns->dev))) in nd_pmem_probe() [all …]
|
D | dax_devs.c | 20 nd_detach_ndns(dev, &nd_pfn->ndns); in nd_dax_release() 94 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_dax_probe() argument 101 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_dax_probe() 103 if (ndns->force_raw) in nd_dax_probe() 106 switch (ndns->claim_class) { in nd_dax_probe() 114 nvdimm_bus_lock(&ndns->dev); in nd_dax_probe() 117 dax_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_dax_probe() 118 nvdimm_bus_unlock(&ndns->dev); in nd_dax_probe() 126 nd_detach_ndns(dax_dev, &nd_pfn->ndns); in nd_dax_probe()
|
D | namespace_devs.c | 133 struct nd_namespace_common *ndns = to_ndns(dev); in pmem_should_map_pages() local 145 if (ndns->force_raw) in pmem_should_map_pages() 158 unsigned int pmem_sector_size(struct nd_namespace_common *ndns) in pmem_sector_size() argument 160 if (is_namespace_pmem(&ndns->dev)) { in pmem_sector_size() 163 nspm = to_nd_namespace_pmem(&ndns->dev); in pmem_sector_size() 169 dev_WARN(&ndns->dev, "unsupported sector size: %ld\n", in pmem_sector_size() 181 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, in nvdimm_namespace_disk_name() argument 184 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() 187 if (ndns->claim && is_nd_btt(ndns->claim)) in nvdimm_namespace_disk_name() 190 if (is_namespace_pmem(&ndns->dev) || is_namespace_io(&ndns->dev)) { in nvdimm_namespace_disk_name() [all …]
|
D | nd.h | 183 struct nd_namespace_common *ndns; member 208 struct nd_namespace_common *ndns; member 268 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns); 273 struct nd_namespace_common *ndns) in nd_btt_probe() argument 294 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns); 298 struct nd_namespace_common *ndns); 303 struct nd_namespace_common *ndns) in nd_pfn_probe() argument 326 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); 331 struct nd_namespace_common *ndns) in nd_dax_probe() argument 363 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns); [all …]
|
D | blk.c | 204 static int nsblk_rw_bytes(struct nd_namespace_common *ndns, in nsblk_rw_bytes() argument 208 struct nd_namespace_blk *nsblk = to_nd_namespace_blk(&ndns->dev); in nsblk_rw_bytes() 215 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() 1610 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1671 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument 1673 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt() [all …]
|
D | bus.c | 910 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 922 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 924 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 926 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 928 if (!ndns) in nd_pmem_forget_poison_check() 931 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 933 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 | 161 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
|
D | region_devs.c | 731 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_advance_seeds() 738 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_advance_seeds() 745 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_advance_seeds()
|
/drivers/dax/pmem/ |
D | core.c | 20 struct nd_namespace_common *ndns; in __dax_pmem_probe() local 25 ndns = nvdimm_namespace_common_probe(dev); in __dax_pmem_probe() 26 if (IS_ERR(ndns)) in __dax_pmem_probe() 27 return ERR_CAST(ndns); in __dax_pmem_probe() 28 nsio = to_nd_namespace_io(&ndns->dev); in __dax_pmem_probe() 43 dev_name(&ndns->dev))) { in __dax_pmem_probe() 48 rc = sscanf(dev_name(&ndns->dev), "namespace%d.%d", ®ion_id, &id); in __dax_pmem_probe()
|