pmem: reduce kmap_atomic sections to the memcpys only
authorVishal Verma <vishal.l.verma@intel.com>
Fri, 30 Sep 2016 23:19:30 +0000 (17:19 -0600)
committerDan Williams <dan.j.williams@intel.com>
Sat, 1 Oct 2016 00:03:45 +0000 (17:03 -0700)
commitbd697a80c329072b991475fa6608bb0e665b3d90
tree9fbdafc9dce374644ef31c24dc87d85216249cbe
parent9ffd6350a103cb9e73e3abb4573c900cfead2f9b
pmem: reduce kmap_atomic sections to the memcpys only

pmem_do_bvec used to kmap_atomic at the begin, and only unmap at the
end. Things like nvdimm_clear_poison may want to do nvdimm subsystem
bookkeeping operations that may involve taking locks or doing memory
allocations, and we can't do that from the atomic context. Reduce the
atomic context to just what needs it - the memcpy to/from pmem.

Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/pmem.c