Lines Matching refs:ndns
23 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release()
173 rc = sprintf(buf, "%s\n", nd_pfn->ndns in namespace_show()
174 ? dev_name(&nd_pfn->ndns->dev) : ""); in namespace_show()
187 rc = nd_namespace_store(dev, &nd_pfn->ndns, buf, len); in namespace_store()
207 struct nd_namespace_common *ndns = nd_pfn->ndns; in resource_show() local
209 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in resource_show()
233 struct nd_namespace_common *ndns = nd_pfn->ndns; in size_show() local
236 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in size_show()
296 struct nd_namespace_common *ndns) in nd_pfn_devinit() argument
307 if (ndns && !__nd_attach_ndns(&nd_pfn->dev, ndns, &nd_pfn->ndns)) { in nd_pfn_devinit()
308 dev_dbg(&ndns->dev, "failed, already claimed by %s\n", in nd_pfn_devinit()
309 dev_name(ndns->claim)); in nd_pfn_devinit()
363 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_clear_memmap_errors() local
373 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_clear_memmap_errors()
381 devm_namespace_disable(&nd_pfn->dev, ndns); in nd_pfn_clear_memmap_errors()
382 rc = devm_namespace_enable(&nd_pfn->dev, ndns, le64_to_cpu(pfn_sb->dataoff)); in nd_pfn_clear_memmap_errors()
402 rc = nvdimm_write_bytes(ndns, nsoff, zero_page, in nd_pfn_clear_memmap_errors()
454 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_validate() local
455 const u8 *parent_uuid = nd_dev_to_uuid(&ndns->dev); in nd_pfn_validate()
457 if (!pfn_sb || !ndns) in nd_pfn_validate()
463 if (nvdimm_read_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0)) in nd_pfn_validate()
569 if (align > nvdimm_namespace_capacity(ndns)) { in nd_pfn_validate()
571 align, nvdimm_namespace_capacity(ndns)); in nd_pfn_validate()
581 nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_validate()
585 dev_name(&ndns->dev)); in nd_pfn_validate()
613 int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns) in nd_pfn_probe() argument
619 struct nd_region *nd_region = to_nd_region(ndns->dev.parent); in nd_pfn_probe()
621 if (ndns->force_raw) in nd_pfn_probe()
624 switch (ndns->claim_class) { in nd_pfn_probe()
632 nvdimm_bus_lock(&ndns->dev); in nd_pfn_probe()
634 pfn_dev = nd_pfn_devinit(nd_pfn, ndns); in nd_pfn_probe()
635 nvdimm_bus_unlock(&ndns->dev); in nd_pfn_probe()
644 nd_detach_ndns(pfn_dev, &nd_pfn->ndns); in nd_pfn_probe()
682 struct nd_namespace_common *ndns = nd_pfn->ndns; in __nvdimm_setup_pfn() local
683 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in __nvdimm_setup_pfn()
720 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_init() local
721 struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev); in nd_pfn_init()
777 dev_name(&ndns->dev), &start, in nd_pfn_init()
804 dev_name(&ndns->dev)); in nd_pfn_init()
814 memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); in nd_pfn_init()
828 return nvdimm_write_bytes(ndns, SZ_4K, pfn_sb, sizeof(*pfn_sb), 0); in nd_pfn_init()
839 if (!nd_pfn->uuid || !nd_pfn->ndns) in nvdimm_setup_pfn()