Home
last modified time | relevance | path

Searched refs:ndns (Results 1 – 12 of 12) sorted by relevance

/drivers/nvdimm/
Dclaim.c23 struct nd_namespace_common *ndns = *_ndns; in __nd_detach_ndns() local
25 dev_WARN_ONCE(dev, !mutex_is_locked(&ndns->dev.mutex) in __nd_detach_ndns()
26 || ndns->claim != dev, in __nd_detach_ndns()
28 ndns->claim = NULL; in __nd_detach_ndns()
30 put_device(&ndns->dev); in __nd_detach_ndns()
36 struct nd_namespace_common *ndns = *_ndns; in nd_detach_ndns() local
38 if (!ndns) in nd_detach_ndns()
40 get_device(&ndns->dev); in nd_detach_ndns()
41 device_lock(&ndns->dev); in nd_detach_ndns()
43 device_unlock(&ndns->dev); in nd_detach_ndns()
[all …]
Dbtt_devs.c30 nd_detach_ndns(&nd_btt->dev, &nd_btt->ndns); in nd_btt_release()
119 rc = sprintf(buf, "%s\n", nd_btt->ndns in namespace_show()
120 ? dev_name(&nd_btt->ndns->dev) : ""); in namespace_show()
133 rc = nd_namespace_store(dev, &nd_btt->ndns, buf, len); in namespace_store()
183 struct nd_namespace_common *ndns) in __nd_btt_create() argument
208 if (ndns && !__nd_attach_ndns(&nd_btt->dev, ndns, &nd_btt->ndns)) { in __nd_btt_create()
209 dev_dbg(&ndns->dev, "%s failed, already claimed by %s\n", in __nd_btt_create()
210 __func__, dev_name(ndns->claim)); in __nd_btt_create()
246 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in nd_btt_arena_is_valid()
271 struct nd_namespace_common *ndns, struct btt_sb *btt_sb) in __nd_btt_probe() argument
[all …]
Dpfn_devs.c31 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release()
185 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show()
186 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show()
199 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store()
219 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local
221 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show()
245 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local
248 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show()
293 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument
304 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit()
[all …]
Dpmem.c238 struct nd_namespace_common *ndns) in pmem_attach_disk() argument
240 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in pmem_attach_disk()
329 nvdimm_namespace_disk_name(ndns, disk->disk_name); in pmem_attach_disk()
348 struct nd_namespace_common *ndns; in nd_pmem_probe() local
350 ndns = nvdimm_namespace_common_probe(dev); in nd_pmem_probe()
351 if (IS_ERR(ndns)) in nd_pmem_probe()
352 return PTR_ERR(ndns); in nd_pmem_probe()
354 if (devm_nsio_enable(dev, to_nd_namespace_io(&ndns->dev))) in nd_pmem_probe()
358 return nvdimm_namespace_attach_btt(ndns); in nd_pmem_probe()
361 return pmem_attach_disk(dev, ndns); in nd_pmem_probe()
[all …]
Ddax_devs.c28 nd_detach_ndns(dev, &nd_pfn->ndns); in nd_dax_release()
102 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_dax_probe() argument
109 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_dax_probe()
111 if (ndns->force_raw) 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()
127 __nd_detach_ndns(dax_dev, &nd_pfn->ndns); in nd_dax_probe()
Dblk.c220 static int nsblk_rw_bytes(struct nd_namespace_common *ndns, in nsblk_rw_bytes() argument
223 struct nd_namespace_blk *nsblk = to_nd_namespace_blk(&ndns->dev); in nsblk_rw_bytes()
230 dev_WARN_ONCE(&ndns->dev, 1, "request out of range\n"); in nsblk_rw_bytes()
308 struct nd_namespace_common *ndns; in nd_blk_probe() local
311 ndns = nvdimm_namespace_common_probe(dev); in nd_blk_probe()
312 if (IS_ERR(ndns)) in nd_blk_probe()
313 return PTR_ERR(ndns); in nd_blk_probe()
315 nsblk = to_nd_namespace_blk(&ndns->dev); in nd_blk_probe()
316 nsblk->size = nvdimm_namespace_capacity(ndns); in nd_blk_probe()
319 ndns->rw_bytes = nsblk_rw_bytes; in nd_blk_probe()
[all …]
Dnd.h183 struct nd_namespace_common *ndns; member
205 struct nd_namespace_common *ndns; member
250 int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns);
255 struct nd_namespace_common *ndns) in nd_btt_probe() argument
273 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns);
277 struct nd_namespace_common *ndns);
282 struct nd_namespace_common *ndns) in nd_pfn_probe() argument
305 int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns);
310 struct nd_namespace_common *ndns) in nd_dax_probe() argument
342 resource_size_t nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
[all …]
Dnamespace_devs.c166 const char *nvdimm_namespace_disk_name(struct nd_namespace_common *ndns, in nvdimm_namespace_disk_name() argument
169 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nvdimm_namespace_disk_name()
172 if (ndns->claim && is_nd_btt(ndns->claim)) in nvdimm_namespace_disk_name()
175 if (is_namespace_pmem(&ndns->dev) || is_namespace_io(&ndns->dev)) { in nvdimm_namespace_disk_name()
178 if (is_namespace_pmem(&ndns->dev)) { in nvdimm_namespace_disk_name()
181 nspm = to_nd_namespace_pmem(&ndns->dev); in nvdimm_namespace_disk_name()
191 } else if (is_namespace_blk(&ndns->dev)) { in nvdimm_namespace_disk_name()
194 nsblk = to_nd_namespace_blk(&ndns->dev); in nvdimm_namespace_disk_name()
960 struct nd_namespace_common *ndns = to_ndns(dev); in __size_store() local
968 if (dev->driver || ndns->claim) in __size_store()
[all …]
Dbtt.c38 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_read_bytes() local
42 return nvdimm_read_bytes(ndns, offset, buf, n); in arena_read_bytes()
49 struct nd_namespace_common *ndns = nd_btt->ndns; in arena_write_bytes() local
53 return nvdimm_write_bytes(ndns, offset, buf, n); in arena_write_bytes()
868 const u8 *parent_uuid = nd_dev_to_uuid(&nd_btt->ndns->dev); in btt_arena_write_layout()
1368 struct nd_namespace_common *ndns = nd_btt->ndns; in btt_blk_init() local
1381 nvdimm_namespace_disk_name(ndns, btt->btt_disk->disk_name); in btt_blk_init()
1514 int nvdimm_namespace_attach_btt(struct nd_namespace_common *ndns) in nvdimm_namespace_attach_btt() argument
1516 struct nd_btt *nd_btt = to_nd_btt(ndns->claim); in nvdimm_namespace_attach_btt()
1521 if (!nd_btt->uuid || !nd_btt->ndns || !nd_btt->lbasize) { in nvdimm_namespace_attach_btt()
[all …]
Dnd-core.h106 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
Dregion_devs.c576 if (nd_region->ns_seed == &nd_btt->ndns->dev) in nd_region_notify_driver_action()
587 if (nd_region->ns_seed == &nd_pfn->ndns->dev) in nd_region_notify_driver_action()
598 if (nd_region->ns_seed == &nd_dax->nd_pfn.ndns->dev) in nd_region_notify_driver_action()
/drivers/dax/
Dpmem.c69 struct nd_namespace_common *ndns; in dax_pmem_probe() local
74 ndns = nvdimm_namespace_common_probe(dev); in dax_pmem_probe()
75 if (IS_ERR(ndns)) in dax_pmem_probe()
76 return PTR_ERR(ndns); in dax_pmem_probe()
77 nsio = to_nd_namespace_io(&ndns->dev); in dax_pmem_probe()
124 rc = sscanf(dev_name(&ndns->dev), "namespace%d.%d", &region_id, &id); in dax_pmem_probe()