libnvdimm: Add a poison list and export badblocks
authorVishal Verma <vishal.l.verma@intel.com>
Fri, 25 Dec 2015 02:21:43 +0000 (19:21 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sat, 9 Jan 2016 16:39:03 +0000 (08:39 -0800)
commit0caeef63e6d2f866d85bb507bf63e0ce8ec91cef
treedbd09f34ab455ca2dfc8c246ff7d19d17edd1de7
parentd26f73f083ed6fbea7fd3fdbacb527b7f3e75ac0
libnvdimm: Add a poison list and export badblocks

During region creation, perform Address Range Scrubs (ARS) for the SPA
(System Physical Address) ranges to retrieve known poison locations from
firmware. Add a new data structure 'nd_poison' which is used as a list
in nvdimm_bus to store these poison locations.

When creating a pmem namespace, if there is any known poison associated
with its physical address space, convert the poison ranges to bad sectors
that are exposed using the badblocks interface.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit.c
drivers/nvdimm/core.c
drivers/nvdimm/nd-core.h
drivers/nvdimm/nd.h
drivers/nvdimm/pmem.c
include/linux/libnvdimm.h