/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 | 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 | 348 struct nd_namespace_common *ndns) in pmem_attach_disk() argument 350 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() 369 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); in pmem_attach_disk() 382 devm_namespace_disable(dev, ndns); in pmem_attach_disk() 394 dev_name(&ndns->dev))) { in pmem_attach_disk() 440 blk_queue_logical_block_size(q, pmem_sector_size(ndns)); in pmem_attach_disk() 448 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk() 485 struct nd_namespace_common *ndns; in nd_pmem_probe() local 487 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe() 488 if (IS_ERR(ndns)) in nd_pmem_probe() [all …]
|
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 | 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 | 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() 277 struct nd_namespace_common *ndns; in nd_blk_probe() local 280 ndns = nvdimm_namespace_common_probe(dev); in nd_blk_probe() 281 if (IS_ERR(ndns)) in nd_blk_probe() 282 return PTR_ERR(ndns); in nd_blk_probe() 284 nsblk = to_nd_namespace_blk(&ndns->dev); in nd_blk_probe() 285 nsblk->size = nvdimm_namespace_capacity(ndns); in nd_blk_probe() 288 ndns->rw_bytes = nsblk_rw_bytes; in nd_blk_probe() [all …]
|
D | nd.h | 334 struct nd_namespace_common *ndns; member 359 struct nd_namespace_common *ndns; member 427 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns); 432 struct nd_namespace_common *ndns) in nd_btt_probe() argument 453 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns); 457 struct nd_namespace_common *ndns); 462 struct nd_namespace_common *ndns) in nd_pfn_probe() argument 485 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); 490 struct nd_namespace_common *ndns) in nd_dax_probe() argument 522 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns); [all …]
|
D | btt.c | 42 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_read_bytes() local 46 return nvdimm_read_bytes(ndns, offset, buf, n, flags); in arena_read_bytes() 53 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_write_bytes() local 57 return nvdimm_write_bytes(ndns, offset, buf, n, flags); in arena_write_bytes() 976 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout() 1522 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local 1528 nvdimm_namespace_disk_name(ndns, btt->btt_disk->disk_name); in btt_blk_init() 1595 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1656 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument 1658 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt() [all …]
|
D | bus.c | 951 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 963 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 965 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 967 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 969 if (!ndns) in nd_pmem_forget_poison_check() 972 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 974 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 | label.c | 818 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() local 865 nsl_set_claim_class(ndd, nd_label, ndns->claim_class); in __pmem_label_update() 1000 struct nd_namespace_common *ndns = &nsblk->common; in __blk_label_update() local 1130 nsl_set_claim_class(ndd, nd_label, 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 | 912 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_advance_seeds() 919 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_advance_seeds() 926 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_advance_seeds()
|
/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()
|