]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nfit: Clarify memory device state flags strings
authorToshi Kani <toshi.kani@hp.com>
Wed, 26 Aug 2015 16:20:23 +0000 (10:20 -0600)
committerDan Duval <dan.duval@oracle.com>
Wed, 7 Dec 2016 17:19:10 +0000 (12:19 -0500)
commitc03cbd6e47192556c5cfb272709cf7bd61cba962
tree89866433be0aaa0c9a0dca67a6925dccdd8eaf6c
parentde5045f86fe5c61fc4869f89869cc1050c730404
nfit: Clarify memory device state flags strings

Orabug: 22913653

ACPI 6.0 NFIT Memory Device State Flags in Table 5-129 defines
NVDIMM status as follows.  These bits indicate multiple info,
such as failures, pending event, and capability.

  Bit [0] set to 1 to indicate that the previous SAVE to the
  Memory Device failed.
  Bit [1] set to 1 to indicate that the last RESTORE from the
  Memory Device failed.
  Bit [2] set to 1 to indicate that platform flush of data to
  Memory Device failed. As a result, the restored data content
  may be inconsistent even if SAVE and RESTORE do not indicate
  failure.
  Bit [3] set to 1 to indicate that the Memory Device is observed
  to be not armed prior to OSPM hand off. A Memory Device is
  considered armed if it is able to accept persistent writes.
  Bit [4] set to 1 to indicate that the Memory Device observed
  SMART and health events prior to OSPM handoff.

/sys/bus/nd/devices/nmemX/nfit/flags shows this flags info.
The output strings associated with the bits are "save", "restore",
"smart", etc., which can be confusing as they may be interpreted
as positive status, i.e. save succeeded.

Change also the dev_info() message in acpi_nfit_register_dimms()
to be consistent with the sysfs flags strings.

Reported-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
[ross: rename 'not_arm' to 'not_armed']
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
[djbw: defer adding bit5, HEALTH_ENABLED, for now]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 402bae597ec68b84498432f5a0069f28bfb807d6)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/acpi/nfit.c