libnvdimm, nfit: report multiple interface codes per-dimm
authorDan Williams <dan.j.williams@intel.com>
Tue, 5 Apr 2016 22:26:50 +0000 (15:26 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 11 Apr 2016 18:11:10 +0000 (11:11 -0700)
commit8cc6ddfcafbb7e32ff025f7d9551ecf9649c12cd
tree0a86bc95293b6c7431bd21477eaf847feb88dc51
parentbf16200689118d19de1b8d2a3c314fc21f5dc7bb
libnvdimm, nfit: report multiple interface codes per-dimm

Starting with ACPI 6.1 an NFIT table will report multiple 'NVDIMM
Control Region Structure' instances per-dimm, one for each supported
format interface.  Report that code in the following format in sysfs:

    nmemX/nfit/formats
    nmemX/nfit/format
    nmemX/nfit/format1
    nmemX/nfit/format2
    ...
    nmemX/nfit/formatN

Where format2 - formatN are theoretical as there are no known DIMMs with
support for more than two interface formats.

This layout is compatible with existing libndctl binaries that only
expect one code per-dimm as they will ignore nmemX/nfit/formats and
nmemX/nfit/formatN.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit.c
drivers/acpi/nfit.h