Lines Matching refs:ndns
22 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release()
172 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show()
173 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show()
186 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store()
206 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local
208 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show()
232 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local
235 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show()
297 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument
309 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit()
310 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in nd_pfn_devinit()
311 dev_name(ndns->claim)); in nd_pfn_devinit()
365 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_clear_memmap_errors() local
375 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_clear_memmap_errors()
383 devm_namespace_disable(&nd_pfn->dev, ndns); in nd_pfn_clear_memmap_errors()
384 rc = devm_namespace_enable(&nd_pfn->dev, ndns, le64_to_cpu(pfn_sb->dataoff)); in nd_pfn_clear_memmap_errors()
404 rc = nvdimm_write_bytes(ndns, nsoff, zero_page, in nd_pfn_clear_memmap_errors()
456 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_validate() local
457 const uuid_t *parent_uuid = nd_dev_to_uuid(&ndns->dev); in nd_pfn_validate()
459 if (!pfn_sb || !ndns) in nd_pfn_validate()
465 if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0)) in nd_pfn_validate()
571 if (align > nvdimm_namespace_capacity(ndns)) { in nd_pfn_validate()
573 align, nvdimm_namespace_capacity(ndns)); in nd_pfn_validate()
583 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_validate()
587 dev_name(&ndns->dev)); in nd_pfn_validate()
615 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_pfn_probe() argument
621 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe()
623 if (ndns->force_raw) in nd_pfn_probe()
626 switch (ndns->claim_class) { in nd_pfn_probe()
634 nvdimm_bus_lock(&ndns->dev); in nd_pfn_probe()
636 pfn_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_pfn_probe()
637 nvdimm_bus_unlock(&ndns->dev); in nd_pfn_probe()
646 nd_detach_ndns(pfn_dev, &nd_pfn->ndns); in nd_pfn_probe()
684 struct nd_namespace_common *ndns = nd_pfn->ndns; in __nvdimm_setup_pfn() local
685 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in __nvdimm_setup_pfn()
722 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_init() local
723 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_init()
779 dev_name(&ndns->dev), &start, in nd_pfn_init()
806 dev_name(&ndns->dev)); in nd_pfn_init()
816 memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); in nd_pfn_init()
830 return nvdimm_write_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0); in nd_pfn_init()
841 if (!nd_pfn->uuid || !nd_pfn->ndns) in nvdimm_setup_pfn()