diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-05-18 14:50:12 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-05-20 22:02:57 -0700 |
commit | c5ed9268643c7c4c9f2aaa0fd4c936095e6480ef (patch) | |
tree | 5fc22cf3fddd4ddad159edfaa4ee83430c0c820f /drivers/nvdimm/nd.h | |
parent | b354aba0165519a74f540f2ba89d7ec78efca21d (diff) |
libnvdimm, dax: autodetect support
For autodetecting a previously established dax configuration we need the
info block to indicate block-device vs device-dax mode, and we need to
have the default namespace probe hand-off the configuration to the
dax_pmem driver.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r-- | drivers/nvdimm/nd.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index 46910b8f32b1..d0ac93c31dda 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -232,7 +232,7 @@ bool is_nd_pfn(struct device *dev); struct device *nd_pfn_create(struct nd_region *nd_region); struct device *nd_pfn_devinit(struct nd_pfn *nd_pfn, struct nd_namespace_common *ndns); -int nd_pfn_validate(struct nd_pfn *nd_pfn); +int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig); extern struct attribute_group nd_pfn_attribute_group; #else static inline int nd_pfn_probe(struct device *dev, @@ -251,7 +251,7 @@ static inline struct device *nd_pfn_create(struct nd_region *nd_region) return NULL; } -static inline int nd_pfn_validate(struct nd_pfn *nd_pfn) +static inline int nd_pfn_validate(struct nd_pfn *nd_pfn, const char *sig) { return -ENODEV; } @@ -259,9 +259,16 @@ static inline int nd_pfn_validate(struct nd_pfn *nd_pfn) struct nd_dax *to_nd_dax(struct device *dev); #if IS_ENABLED(CONFIG_NVDIMM_DAX) +int nd_dax_probe(struct device *dev, struct nd_namespace_common *ndns); bool is_nd_dax(struct device *dev); struct device *nd_dax_create(struct nd_region *nd_region); #else +static inline int nd_dax_probe(struct device *dev, + struct nd_namespace_common *ndns) +{ + return -ENODEV; +} + static inline bool is_nd_dax(struct device *dev) { return false; |