Commit 480b6837 authored by Oliver O'Halloran's avatar Oliver O'Halloran Committed by Dan Williams

nvdimm: fix PHYS_PFN/PFN_PHYS mixup

nd_activate_region() iomaps any hint addresses required when activating
a region. To prevent duplicate mappings it checks the PFN of the hint to
be mapped against the PFNs of the already mapped hints. Unfortunately it
doesn't convert the PFN back into a physical address before passing it
to devm_nvdimm_ioremap(). Instead it applies PHYS_PFN a second time
which ends about as well as you would imagine.
Signed-off-by: default avatarOliver O'Halloran <>
Signed-off-by: default avatarDan Williams <>
parent 3be79886
......@@ -57,7 +57,7 @@ static int nvdimm_map_flush(struct device *dev, struct nvdimm *nvdimm, int dimm,
ndrd->flush_wpq[dimm][j] & PAGE_MASK);
flush_page = devm_nvdimm_ioremap(dev,
if (!flush_page)
return -ENXIO;
ndrd->flush_wpq[dimm][i] = flush_page
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment