]> git.baikalelectronics.ru Git - kernel.git/commit
libnvdimm, pmem: Restore page attributes when clearing errors
authorDan Williams <dan.j.williams@intel.com>
Sat, 14 Jul 2018 04:50:37 +0000 (21:50 -0700)
committerDave Jiang <dave.jiang@intel.com>
Mon, 20 Aug 2018 16:22:45 +0000 (09:22 -0700)
commit9c1161bd3168dacceac9327dffc9a5b463b90085
tree29e82381bba655d2141bf39c261312b56d128442
parented08cd8521eaa76a715c75a84b619cb6443f44d8
libnvdimm, pmem: Restore page attributes when clearing errors

Use clear_mce_nospec() to restore WB mode for the kernel linear mapping
of a pmem page that was marked 'HWPoison'. A page with 'HWPoison' set
has also been marked UC in PAT (page attribute table) via
set_mce_nospec() to prevent speculative retrievals of poison.

The 'HWPoison' flag is only cleared when overwriting an entire page.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/nvdimm/pmem.c
drivers/nvdimm/pmem.h