diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-10-15 15:33:52 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-10-19 08:57:33 -0700 |
commit | 42237e393f64d619ed56e17fbf8fd27526485695 (patch) | |
tree | 51789f92c92ae65b02ef4e8834c05ee17045b9b8 /drivers/nvdimm/dimm.c | |
parent | 8d7c22ac0c036978a072b7e13c607b5402c474e0 (diff) | |
download | linux-42237e393f64d619ed56e17fbf8fd27526485695.tar.gz linux-42237e393f64d619ed56e17fbf8fd27526485695.tar.bz2 linux-42237e393f64d619ed56e17fbf8fd27526485695.zip |
libnvdimm: allow a platform to force enable label support
Platforms like QEMU-KVM implement an NFIT table and label DSMs.
However, since that environment does not define an aliased
configuration, the labels are currently ignored and the kernel registers
a single full-sized pmem-namespace per region. Now that the kernel
supports sub-divisions of pmem regions the labels have a purpose.
Arrange for the labels to be honored when we find an existing / valid
namespace index block.
Cc: <qemu-devel@nongnu.org>
Cc: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/dimm.c')
-rw-r--r-- | drivers/nvdimm/dimm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvdimm/dimm.c b/drivers/nvdimm/dimm.c index 619834e144d1..ee0b412827bf 100644 --- a/drivers/nvdimm/dimm.c +++ b/drivers/nvdimm/dimm.c @@ -64,6 +64,8 @@ static int nvdimm_probe(struct device *dev) nd_label_copy(ndd, to_next_namespace_index(ndd), to_current_namespace_index(ndd)); rc = nd_label_reserve_dpa(ndd); + if (ndd->ns_current >= 0) + nvdimm_set_aliasing(dev); nvdimm_bus_unlock(dev); if (rc) |