nfit: fix multi-interface dimm handling, acpi6.1 compatibility
authorDan Williams <dan.j.williams@intel.com>
Fri, 5 Feb 2016 00:51:00 +0000 (16:51 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:24 +0000 (15:07 -0800)
commitef1fb7d12ac8863557390ead966566ed3477b023
tree6d2fe81ac73c9e475142e88154d41542e6fa2c36
parent5066e4475fe82ba77afd521bf373c7ee8faac0c8
nfit: fix multi-interface dimm handling, acpi6.1 compatibility

commit 6697b2cf69d4363266ca47eaebc49ef13dabc1c9 upstream.

ACPI 6.1 clarified that multi-interface dimms require multiple control
region entries (DCRs) per dimm.  Previously we were assuming that a
control region is only present when block-data-windows are present.
This implementation was done with an eye to be compatibility with the
looser ACPI 6.0 interpretation of this table.

1/ When coalescing the memory device (MEMDEV) tables for a single dimm,
coalesce on device_handle rather than control region index.

2/ Whenever we disocver a control region with non-zero block windows
re-scan for block-data-window (BDW) entries.

We may need to revisit this if a DIMM ever implements a format interface
outside of blk or pmem, but that is not on the foreseeable horizon.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/nfit.c