libnvdimm, dax: introduce device-dax infrastructure
Device DAX is the device-centric analogue of Filesystem DAX (CONFIG_FS_DAX). It allows persistent memory ranges to be allocated and mapped without need of an intervening file system. This initial infrastructure arranges for a libnvdimm pfn-device to be represented as a different device-type so that it can be attached to a driver other than the pmem driver. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
@@ -54,6 +54,7 @@ static int nd_region_probe(struct device *dev)
|
||||
|
||||
nd_region->btt_seed = nd_btt_create(nd_region);
|
||||
nd_region->pfn_seed = nd_pfn_create(nd_region);
|
||||
nd_region->dax_seed = nd_dax_create(nd_region);
|
||||
if (err == 0)
|
||||
return 0;
|
||||
|
||||
@@ -86,6 +87,7 @@ static int nd_region_remove(struct device *dev)
|
||||
nd_region->ns_seed = NULL;
|
||||
nd_region->btt_seed = NULL;
|
||||
nd_region->pfn_seed = NULL;
|
||||
nd_region->dax_seed = NULL;
|
||||
dev_set_drvdata(dev, NULL);
|
||||
nvdimm_bus_unlock(dev);
|
||||
|
||||
|
Fai riferimento in un nuovo problema
Block a user