]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfit: Adjust for different _FIT and NFIT headers
authorLinda Knippers <linda.knippers@hpe.com>
Sat, 21 Nov 2015 00:05:49 +0000 (19:05 -0500)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:25:24 +0000 (12:25 -0500)
commit713efc68601b82e5b601024aa0a6fdb8d9236361
treea996d9e0bf2e3d318ca623aace3a28dc3d64d372
parent006f062fa92d4f142a124af5415a8b2a841bc2d8
nfit: Adjust for different _FIT and NFIT headers

Orabug: 22913653

When support for _FIT was added, the code presumed that the data
returned by the _FIT method is identical to the NFIT table, which
starts with an acpi_table_header.  However, the _FIT is defined
to return a data in the format of a series of NFIT type structure
entries and as a method, has an acpi_object header rather tahn
an acpi_table_header.

To address the differences, explicitly save the acpi_table_header
from the NFIT, since it is accessible through /sys, and change
the nfit pointer in the acpi_desc structure to point to the
table entries rather than the headers.

Reported-by: Jeff Moyer (jmoyer@redhat.com>
Signed-off-by: Linda Knippers <linda.knippers@hpe.com>
Acked-by: Vishal Verma <vishal.l.verma@intel.com>
[vishal: fix up unit test for new header assumptions]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 6b577c9d772c45448aec784ec235cea228b4d3ad)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/acpi/nfit.c
drivers/acpi/nfit.h
tools/testing/nvdimm/test/nfit.c