Searched refs:nd_pfn (Results 1 – 5 of 5) sorted by relevance
27 struct nd_pfn *nd_pfn = to_nd_pfn(dev); in nd_pfn_release() local30 nd_detach_ndns(&nd_pfn->dev, &nd_pfn->ndns); in nd_pfn_release()31 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id); in nd_pfn_release()32 kfree(nd_pfn->uuid); in nd_pfn_release()33 kfree(nd_pfn); in nd_pfn_release()47 struct nd_pfn *to_nd_pfn(struct device *dev) in to_nd_pfn()49 struct nd_pfn *nd_pfn = container_of(dev, struct nd_pfn, dev); in to_nd_pfn() local52 return nd_pfn; in to_nd_pfn()59 struct nd_pfn *nd_pfn = to_nd_pfn(dev); in mode_show() local61 switch (nd_pfn->mode) { in mode_show()[all …]
225 static int nd_pfn_init(struct nd_pfn *nd_pfn) in nd_pfn_init() argument228 struct pmem_device *pmem = dev_get_drvdata(&nd_pfn->dev); in nd_pfn_init()229 struct nd_namespace_common *ndns = nd_pfn->ndns; in nd_pfn_init()239 nd_pfn->pfn_sb = pfn_sb; in nd_pfn_init()240 rc = nd_pfn_validate(nd_pfn); in nd_pfn_init()249 nd_region = to_nd_region(nd_pfn->dev.parent); in nd_pfn_init()251 dev_info(&nd_pfn->dev, in nd_pfn_init()265 if (nd_pfn->mode == PFN_MODE_PMEM) in nd_pfn_init()267 else if (nd_pfn->mode == PFN_MODE_RAM) in nd_pfn_init()273 pfn_sb->mode = cpu_to_le32(nd_pfn->mode); in nd_pfn_init()[all …]
107 struct nd_pfn *nd_pfn = to_nd_pfn(dev); in nd_detach_and_reset() local109 kfree(nd_pfn->uuid); in nd_detach_and_reset()110 nd_pfn->uuid = NULL; in nd_detach_and_reset()111 nd_pfn->mode = PFN_MODE_NONE; in nd_detach_and_reset()
152 struct nd_pfn { struct216 struct nd_pfn *to_nd_pfn(struct device *dev);221 int nd_pfn_validate(struct nd_pfn *nd_pfn);238 static inline int nd_pfn_validate(struct nd_pfn *nd_pfn) in nd_pfn_validate() argument
97 struct nd_pfn *nd_pfn = to_nd_pfn(dev); in is_uuid_busy() local99 uuid2 = nd_pfn->uuid; in is_uuid_busy()1344 struct nd_pfn *nd_pfn = is_nd_pfn(dev) ? to_nd_pfn(dev) : NULL; in nvdimm_namespace_common_probe() local1348 if (nd_btt || nd_pfn) { in nvdimm_namespace_common_probe()1354 } else if (nd_pfn) { in nvdimm_namespace_common_probe()1355 host = &nd_pfn->dev; in nvdimm_namespace_common_probe()1356 ndns = nd_pfn->ndns; in nvdimm_namespace_common_probe()