Lines Matching refs:dev_dax
275 struct dev_dax *dev_dax = to_dev_dax(dev); in size_show() local
276 unsigned long long size = resource_size(&dev_dax->region->res); in size_show()
282 static int dev_dax_target_node(struct dev_dax *dev_dax) in dev_dax_target_node() argument
284 struct dax_region *dax_region = dev_dax->region; in dev_dax_target_node()
292 struct dev_dax *dev_dax = to_dev_dax(dev); in target_node_show() local
294 return sprintf(buf, "%d\n", dev_dax_target_node(dev_dax)); in target_node_show()
298 static unsigned long long dev_dax_resource(struct dev_dax *dev_dax) in dev_dax_resource() argument
300 struct dax_region *dax_region = dev_dax->region; in dev_dax_resource()
308 struct dev_dax *dev_dax = to_dev_dax(dev); in resource_show() local
310 return sprintf(buf, "%#llx\n", dev_dax_resource(dev_dax)); in resource_show()
328 struct dev_dax *dev_dax = to_dev_dax(dev); in dev_dax_visible() local
330 if (a == &dev_attr_target_node.attr && dev_dax_target_node(dev_dax) < 0) in dev_dax_visible()
355 void kill_dev_dax(struct dev_dax *dev_dax) in kill_dev_dax() argument
357 struct dax_device *dax_dev = dev_dax->dax_dev; in kill_dev_dax()
367 struct dev_dax *dev_dax = to_dev_dax(dev); in dev_dax_release() local
368 struct dax_region *dax_region = dev_dax->region; in dev_dax_release()
369 struct dax_device *dax_dev = dev_dax->dax_dev; in dev_dax_release()
373 kfree(dev_dax); in dev_dax_release()
378 struct dev_dax *dev_dax = to_dev_dax(dev); in unregister_dev_dax() local
382 kill_dev_dax(dev_dax); in unregister_dev_dax()
387 struct dev_dax *__devm_create_dev_dax(struct dax_region *dax_region, int id, in __devm_create_dev_dax()
392 struct dev_dax *dev_dax; in __devm_create_dev_dax() local
400 dev_dax = kzalloc(sizeof(*dev_dax), GFP_KERNEL); in __devm_create_dev_dax()
401 if (!dev_dax) in __devm_create_dev_dax()
404 memcpy(&dev_dax->pgmap, pgmap, sizeof(*pgmap)); in __devm_create_dev_dax()
410 dax_dev = alloc_dax(dev_dax, NULL, NULL, DAXDEV_F_SYNC); in __devm_create_dev_dax()
418 dev = &dev_dax->dev; in __devm_create_dev_dax()
421 dev_dax->dax_dev = dax_dev; in __devm_create_dev_dax()
422 dev_dax->region = dax_region; in __devm_create_dev_dax()
423 dev_dax->target_node = dax_region->target_node; in __devm_create_dev_dax()
439 kill_dev_dax(dev_dax); in __devm_create_dev_dax()
448 return dev_dax; in __devm_create_dev_dax()
451 kfree(dev_dax); in __devm_create_dev_dax()