]> git.baikalelectronics.ru Git - kernel.git/commit
nvdimm: fix PHYS_PFN/PFN_PHYS mixup
authorOliver O'Halloran <oohall@gmail.com>
Mon, 19 Sep 2016 10:19:00 +0000 (20:19 +1000)
committerDan Williams <dan.j.williams@intel.com>
Mon, 19 Sep 2016 15:54:27 +0000 (08:54 -0700)
commit7526454c857c683d1b2fdb8f2f4a0a15c348e174
tree71aca7c1b20a42e451eca88044a2a81a777e827a
parent6f0492d57521ebcb7738041489264027c3c20a0a
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: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/region_devs.c