| /linux/drivers/nvdimm/ |
| H A 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() 38 struct device *ndev __free(put_device) = get_device(&ndns->dev); in nd_detach_ndns() 58 static bool is_idle(struct device *dev, struct nd_namespace_common *ndns) in is_idle() argument 120 struct nd_namespace_common *ndns; nd_namespace_store() local 233 nsio_rw_bytes(struct nd_namespace_common * ndns,resource_size_t offset,void * buf,size_t size,int rw,unsigned long flags) nsio_rw_bytes() argument 288 struct nd_namespace_common *ndns = &nsio->common; devm_nsio_enable() local [all...] |
| H A D | btt_devs.c | 21 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release() 96 return sprintf(buf, "%s\n", nd_btt->ndns in namespace_show() 97 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show() 108 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store() 178 struct nd_namespace_common *ndns) in __nd_btt_create() argument 204 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create() 205 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create() 206 dev_name(ndns in __nd_btt_create() 268 nd_btt_version(struct nd_btt * nd_btt,struct nd_namespace_common * ndns,struct btt_sb * btt_sb) nd_btt_version() argument 304 __nd_btt_probe(struct nd_btt * nd_btt,struct nd_namespace_common * ndns,struct btt_sb * btt_sb) __nd_btt_probe() argument 328 nd_btt_probe(struct device * dev,struct nd_namespace_common * ndns) nd_btt_probe() argument [all...] |
| H A D | pfn_devs.c | 24 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release() 167 return sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show() 168 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show() 179 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store() 197 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local 199 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show() 223 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local 226 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns in size_show() 288 nd_pfn_devinit(struct nd_pfn * nd_pfn,struct nd_namespace_common * ndns) nd_pfn_devinit() argument 356 struct nd_namespace_common *ndns = nd_pfn->ndns; nd_pfn_clear_memmap_errors() local 449 struct nd_namespace_common *ndns = nd_pfn->ndns; nd_pfn_validate() local 612 nd_pfn_probe(struct device * dev,struct nd_namespace_common * ndns) nd_pfn_probe() argument 681 struct nd_namespace_common *ndns = nd_pfn->ndns; __nvdimm_setup_pfn() local 719 struct nd_namespace_common *ndns = nd_pfn->ndns; nd_pfn_init() local [all...] |
| H A D | namespace_devs.c | 93 struct nd_namespace_common *ndns = to_ndns(dev); in pmem_should_map_pages() local 105 if (ndns->force_raw) in pmem_should_map_pages() 118 unsigned int pmem_sector_size(struct nd_namespace_common *ndns) in pmem_sector_size() argument 120 if (is_namespace_pmem(&ndns->dev)) { in pmem_sector_size() 123 nspm = to_nd_namespace_pmem(&ndns->dev); in pmem_sector_size() 129 dev_WARN(&ndns->dev, "unsupported sector size: %ld\n", in pmem_sector_size() 141 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, in nvdimm_namespace_disk_name() argument 144 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name() 147 if (ndns->claim && is_nd_btt(ndns in nvdimm_namespace_disk_name() 751 struct nd_namespace_common *ndns = to_ndns(dev); __size_store() local 870 __nvdimm_namespace_capacity(struct nd_namespace_common * ndns) __nvdimm_namespace_capacity() argument 887 nvdimm_namespace_capacity(struct nd_namespace_common * ndns) nvdimm_namespace_capacity() argument 894 nvdimm_namespace_locked(struct nd_namespace_common * ndns) nvdimm_namespace_locked() argument 1236 struct nd_namespace_common *ndns = to_ndns(dev); holder_show() local 1249 struct nd_namespace_common *ndns = to_ndns(dev); __holder_class_store() local 1292 struct nd_namespace_common *ndns = to_ndns(dev); holder_class_show() local 1316 struct nd_namespace_common *ndns = to_ndns(dev); mode_show() local 1436 struct nd_namespace_common *ndns = NULL; nvdimm_namespace_common_probe() local 1514 devm_namespace_enable(struct device * dev,struct nd_namespace_common * ndns,resource_size_t size) devm_namespace_enable() argument 1521 devm_namespace_disable(struct device * dev,struct nd_namespace_common * ndns) devm_namespace_disable() argument [all...] |
| H A D | pmem.c | 464 struct nd_namespace_common *ndns) in pmem_attach_disk() argument 466 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk() 469 .logical_block_size = pmem_sector_size(ndns), in pmem_attach_disk() 490 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); in pmem_attach_disk() 503 devm_namespace_disable(dev, ndns); in pmem_attach_disk() 519 dev_name(&ndns->dev))) { in pmem_attach_disk() 563 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk() 616 struct nd_namespace_common *ndns; in nd_pmem_probe() 618 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe() 619 if (IS_ERR(ndns)) in nd_pmem_probe() 614 struct nd_namespace_common *ndns; nd_pmem_probe() local 689 struct nd_namespace_common *ndns; pmem_revalidate_poison() local [all...] |
| H A 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 scoped_guard(nvdimm_bus, &ndns->dev) { in nd_dax_probe() 109 dax_dev = nd_dax_devinit(nd_dax, ndns); in nd_dax_probe() 119 nd_detach_ndns(dax_dev, &nd_pfn->ndns); in nd_dax_probe()
|
| H A D | btt.c | 43 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_read_bytes() local 47 return nvdimm_read_bytes(ndns, offset, buf, n, flags); in arena_read_bytes() 54 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_write_bytes() local 58 return nvdimm_write_bytes(ndns, offset, buf, n, flags); in arena_write_bytes() 980 const uuid_t *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout() 1510 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local 1528 nvdimm_namespace_disk_name(ndns, bt in btt_blk_init() 1655 nvdimm_namespace_attach_btt(struct nd_namespace_common * ndns) nvdimm_namespace_attach_btt() argument [all...] |
| H A D | bus.c | 956 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 968 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 970 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 972 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 974 if (!ndns) in nd_pmem_forget_poison_check() 977 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 979 nsio = to_nd_namespace_io(&ndns->dev); in nd_pmem_forget_poison_check()
|
| H A D | btt.h | 236 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns,
|
| H A D | nd-core.h | 134 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
|
| H A D | region_devs.c | 886 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_advance_seeds() 893 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_advance_seeds() 900 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_advance_seeds()
|
| H A D | label.c | 889 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() local 937 nsl_set_claim_class(ndd, nd_label, ndns->claim_class); in __pmem_label_update()
|
| /linux/include/linux/ |
| H A D | nd.h | 167 static inline int nvdimm_read_bytes(struct nd_namespace_common *ndns, in nvdimm_read_bytes() argument 171 return ndns->rw_bytes(ndns, offset, buf, size, READ, flags); in nvdimm_read_bytes() 189 static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, in nvdimm_write_bytes() argument 193 return ndns->rw_bytes(ndns, offset, buf, size, WRITE, flags); in nvdimm_write_bytes()
|