/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() 37 get_device(&ndns->dev); in nd_detach_ndns() 38 nvdimm_bus_lock(&ndns in nd_detach_ndns() 77 is_idle(struct device * dev,struct nd_namespace_common * ndns) is_idle() argument 139 struct nd_namespace_common *ndns; nd_namespace_store() local 252 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 307 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() 99 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show() 100 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show() 113 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store() 185 struct nd_namespace_common *ndns) in __nd_btt_create() argument 211 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create() 212 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in __nd_btt_create() 213 dev_name(ndns->claim)); in __nd_btt_create() 249 const uuid_t *ns_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid() 275 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, in nd_btt_version() argument [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->claim)) in nvdimm_namespace_disk_name() 150 if (is_namespace_pmem(&ndns->dev) || is_namespace_io(&ndns->dev)) { in nvdimm_namespace_disk_name() [all …]
|
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() 971 const uuid_t *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout() 1499 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local 1517 nvdimm_namespace_disk_name(ndns, btt->btt_disk->disk_name); in btt_blk_init() 1580 nsio = to_nd_namespace_io(&nd_btt->ndns->dev); in btt_init() 1641 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument 1643 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt() [all …]
|
H A D | bus.c | 958 struct nd_namespace_common *ndns = NULL; in nd_pmem_forget_poison_check() local 970 ndns = nd_btt->ndns; in nd_pmem_forget_poison_check() 972 ndns = nd_pfn->ndns; in nd_pmem_forget_poison_check() 974 ndns = nd_dax->nd_pfn.ndns; in nd_pmem_forget_poison_check() 976 if (!ndns) in nd_pmem_forget_poison_check() 979 ndns = to_ndns(dev); in nd_pmem_forget_poison_check() 981 nsio = to_nd_namespace_io(&ndns in nd_pmem_forget_poison_check() [all...] |
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 | 136 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
|
H A D | region_devs.c | 901 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_advance_seeds() 908 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_advance_seeds() 915 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_advance_seeds()
|
H A D | label.c | 877 struct nd_namespace_common *ndns = &nspm->nsio.common; in __pmem_label_update() local 925 nsl_set_claim_class(ndd, nd_label, ndns->claim_class); in __pmem_label_update()
|
/linux/include/linux/ |
H A D | nd.h | 164 static inline int nvdimm_read_bytes(struct nd_namespace_common *ndns, in nvdimm_read_bytes() argument 168 return ndns->rw_bytes(ndns, offset, buf, size, READ, flags); in nvdimm_read_bytes() 183 static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, in nvdimm_write_bytes() argument 187 return ndns->rw_bytes(ndns, offset, buf, size, WRITE, flags); in nvdimm_write_bytes()
|
/linux/Documentation/driver-api/nvdimm/ |
H A D | nvdimm.rst | 511 struct ndctl_namespace *ndns; 513 ndctl_namespace_foreach(region, ndns) 514 if (ndctl_namespace_get_id(ndns) == id) 515 return ndns; 532 struct ndctl_namespace *ndns, 540 ndctl_namespace_set_alt_name(ndns, devname); 542 ndctl_namespace_set_uuid(ndns, paramaters->uuid); 543 ndctl_namespace_set_size(ndns, paramaters->size); 546 ndctl_namespace_set_sector_size(ndns, parameters->lbasize); 547 ndctl_namespace_enable(ndns); [all …]
|