/linux-master/drivers/nvdimm/ |
H A D | claim.c | 16 struct nd_namespace_common *ndns = *_ndns; local 19 if (!ndns) 22 nvdimm_bus = walk_to_nvdimm_bus(&ndns->dev); 24 dev_WARN_ONCE(dev, ndns->claim != dev, "%s: invalid claim\n", __func__); 25 ndns->claim = NULL; 27 put_device(&ndns->dev); 33 struct nd_namespace_common *ndns = *_ndns; local 35 if (!ndns) 37 get_device(&ndns->dev); 38 nvdimm_bus_lock(&ndns 77 is_idle(struct device *dev, struct nd_namespace_common *ndns) argument 139 struct nd_namespace_common *ndns; local 252 nsio_rw_bytes(struct nd_namespace_common *ndns, resource_size_t offset, void *buf, size_t size, int rw, unsigned long flags) argument 307 struct nd_namespace_common *ndns = &nsio->common; local [all...] |
H A D | btt_devs.c | 21 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); 99 rc = sprintf(buf, "%s\n", nd_btt->ndns 100 ? dev_name(&nd_btt->ndns->dev) : ""); 113 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); 185 struct nd_namespace_common *ndns) 211 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { 212 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", 213 dev_name(ndns 183 __nd_btt_create(struct nd_region *nd_region, unsigned long lbasize, uuid_t *uuid, struct nd_namespace_common *ndns) argument 275 nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, struct btt_sb *btt_sb) argument 310 __nd_btt_probe(struct nd_btt *nd_btt, struct nd_namespace_common *ndns, struct btt_sb *btt_sb) argument 335 nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns) argument [all...] |
H A D | dax_devs.c | 20 nd_detach_ndns(dev, &nd_pfn->ndns); 87 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns) argument 94 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); 96 if (ndns->force_raw) 99 switch (ndns->claim_class) { 107 nvdimm_bus_lock(&ndns->dev); 110 dax_dev = nd_pfn_devinit(nd_pfn, ndns); 111 nvdimm_bus_unlock(&ndns->dev); 119 nd_detach_ndns(dax_dev, &nd_pfn->ndns);
|
H A D | pfn_devs.c | 24 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); 174 rc = sprintf(buf, "%s\n", nd_pfn->ndns 175 ? dev_name(&nd_pfn->ndns->dev) : ""); 188 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); 208 struct nd_namespace_common *ndns = nd_pfn->ndns; local 210 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); 234 struct nd_namespace_common *ndns = nd_pfn->ndns; local 237 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns 298 nd_pfn_devinit(struct nd_pfn *nd_pfn, struct nd_namespace_common *ndns) argument 367 struct nd_namespace_common *ndns = nd_pfn->ndns; local 459 struct nd_namespace_common *ndns = nd_pfn->ndns; local 622 nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns) argument 691 struct nd_namespace_common *ndns = nd_pfn->ndns; local 729 struct nd_namespace_common *ndns = nd_pfn->ndns; local [all...] |
H A D | namespace_devs.c | 93 struct nd_namespace_common *ndns = to_ndns(dev); local 105 if (ndns->force_raw) 118 unsigned int pmem_sector_size(struct nd_namespace_common *ndns) argument 120 if (is_namespace_pmem(&ndns->dev)) { 123 nspm = to_nd_namespace_pmem(&ndns->dev); 129 dev_WARN(&ndns->dev, "unsupported sector size: %ld\n", 141 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, argument 144 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); 147 if (ndns->claim && is_nd_btt(ndns 753 struct nd_namespace_common *ndns = to_ndns(dev); local 875 __nvdimm_namespace_capacity(struct nd_namespace_common *ndns) argument 892 nvdimm_namespace_capacity(struct nd_namespace_common *ndns) argument 904 nvdimm_namespace_locked(struct nd_namespace_common *ndns) argument 1240 struct nd_namespace_common *ndns = to_ndns(dev); local 1253 struct nd_namespace_common *ndns = to_ndns(dev); local 1298 struct nd_namespace_common *ndns = to_ndns(dev); local 1322 struct nd_namespace_common *ndns = to_ndns(dev); local 1442 struct nd_namespace_common *ndns = NULL; local 1520 devm_namespace_enable(struct device *dev, struct nd_namespace_common *ndns, resource_size_t size) argument 1527 devm_namespace_disable(struct device *dev, struct nd_namespace_common *ndns) argument [all...] |
H A D | pmem.c | 450 struct nd_namespace_common *ndns) 452 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); 455 .logical_block_size = pmem_sector_size(ndns), 475 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); 488 devm_namespace_disable(dev, ndns); 500 dev_name(&ndns->dev))) { 554 nvdimm_namespace_disk_name(ndns, disk->disk_name); 605 struct nd_namespace_common *ndns; local 607 ndns = nvdimm_namespace_common_probe(dev); 608 if (IS_ERR(ndns)) 449 pmem_attach_disk(struct device *dev, struct nd_namespace_common *ndns) argument 680 struct nd_namespace_common *ndns; local [all...] |
H A D | nd.h | 450 struct nd_namespace_common *ndns; member in struct:nd_btt 475 struct nd_namespace_common *ndns; member in struct:nd_pfn 543 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns); 548 struct nd_namespace_common *ndns) 569 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns); 573 struct nd_namespace_common *ndns); 578 struct nd_namespace_common *ndns) 601 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); 606 struct nd_namespace_common *ndns) 638 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns); 547 nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns) argument 577 nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns) argument 605 nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns) argument [all...] |
H A D | btt.c | 42 struct nd_namespace_common *ndns = nd_btt->ndns; local 46 return nvdimm_read_bytes(ndns, offset, buf, n, flags); 53 struct nd_namespace_common *ndns = nd_btt->ndns; local 57 return nvdimm_write_bytes(ndns, offset, buf, n, flags); 970 const uuid_t *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); 1498 struct nd_namespace_common *ndns = nd_btt->ndns; local 1509 nvdimm_namespace_disk_name(ndns, bt 1642 nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) argument [all...] |
H A D | btt.h | 236 int nd_btt_version(struct nd_btt *nd_btt, struct nd_namespace_common *ndns,
|
H A D | bus.c | 955 struct nd_namespace_common *ndns = NULL; local 967 ndns = nd_btt->ndns; 969 ndns = nd_pfn->ndns; 971 ndns = nd_dax->nd_pfn.ndns; 973 if (!ndns) 976 ndns = to_ndns(dev); 978 nsio = to_nd_namespace_io(&ndns [all...] |
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) 908 if (nd_region->ns_seed == &nd_pfn->ndns->dev) 915 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev)
|
H A D | label.c | 877 struct nd_namespace_common *ndns = &nspm->nsio.common; local 925 nsl_set_claim_class(ndd, nd_label, ndns->claim_class);
|
/linux-master/drivers/dax/ |
H A D | pmem.c | 20 struct nd_namespace_common *ndns; local 25 ndns = nvdimm_namespace_common_probe(dev); 26 if (IS_ERR(ndns)) 27 return ERR_CAST(ndns); 30 rc = devm_namespace_enable(dev, ndns, nd_info_block_reserve()); 36 devm_namespace_disable(dev, ndns); 41 nsio = to_nd_namespace_io(&ndns->dev); 43 dev_name(&ndns->dev))) { 48 rc = sscanf(dev_name(&ndns->dev), "namespace%d.%d", ®ion_id, &id);
|
/linux-master/include/linux/ |
H A D | nd.h | 161 * @ndns: device to read 168 static inline int nvdimm_read_bytes(struct nd_namespace_common *ndns, argument 172 return ndns->rw_bytes(ndns, offset, buf, size, READ, flags); 177 * @ndns: device to write 183 * the @ndns, the contents of @buf may be in cpu cache, platform buffers, 185 * to media is handled internal to the @ndns driver, if at all. 187 static inline int nvdimm_write_bytes(struct nd_namespace_common *ndns, argument 191 return ndns->rw_bytes(ndns, offse [all...] |