Lines Matching refs:ndns
23 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release()
184 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show()
185 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show()
198 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store()
218 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local
220 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show()
244 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local
247 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show()
303 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument
314 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit()
315 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in nd_pfn_devinit()
316 dev_name(ndns->claim)); in nd_pfn_devinit()
371 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_clear_memmap_errors() local
381 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_clear_memmap_errors()
401 rc = nvdimm_write_bytes(ndns, nsoff, zero_page, in nd_pfn_clear_memmap_errors()
452 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_validate() local
453 const u8 *parent_uuid = nd_dev_to_uuid(&ndns->dev); in nd_pfn_validate()
455 if (!pfn_sb || !ndns) in nd_pfn_validate()
461 if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0)) in nd_pfn_validate()
567 if (align > nvdimm_namespace_capacity(ndns)) { in nd_pfn_validate()
569 align, nvdimm_namespace_capacity(ndns)); in nd_pfn_validate()
579 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_validate()
582 dev_name(&ndns->dev)); in nd_pfn_validate()
598 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_pfn_probe() argument
604 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe()
606 if (ndns->force_raw) in nd_pfn_probe()
609 switch (ndns->claim_class) { in nd_pfn_probe()
617 nvdimm_bus_lock(&ndns->dev); in nd_pfn_probe()
619 pfn_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_pfn_probe()
620 nvdimm_bus_unlock(&ndns->dev); in nd_pfn_probe()
629 nd_detach_ndns(pfn_dev, &nd_pfn->ndns); in nd_pfn_probe()
672 struct nd_namespace_common *ndns = nd_pfn->ndns; in __nvdimm_setup_pfn() local
673 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in __nvdimm_setup_pfn()
709 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_init() local
710 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_init()
779 dev_name(&ndns->dev)); in nd_pfn_init()
789 memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); in nd_pfn_init()
799 return nvdimm_write_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0); in nd_pfn_init()
810 if (!nd_pfn->uuid || !nd_pfn->ndns) in nvdimm_setup_pfn()