b791abf320
Implement support for fetching nvdimm health information via
H_SCM_HEALTH hcall as documented in Ref[1]. The hcall returns a pair
of 64-bit bitmap, bitwise-and of which is then stored in
'struct papr_scm_priv' and subsequently partially exposed to
user-space via newly introduced dimm specific attribute
'papr/flags'. Since the hcall is costly, the health information is
cached and only re-queried, 60s after the previous successful hcall.
The patch also adds a documentation text describing flags reported by
the the new sysfs attribute 'papr/flags' is also introduced at
Documentation/ABI/testing/sysfs-bus-papr-pmem.
[1] commit 58b278f568
("powerpc: Provide initial documentation for
PAPR hcalls")
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Cc: "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20200615124407.32596-4-vaibhav@linux.ibm.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
What: /sys/bus/nd/devices/nmemX/papr/flags
|
|
Date: Apr, 2020
|
|
KernelVersion: v5.8
|
|
Contact: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, linux-nvdimm@lists.01.org,
|
|
Description:
|
|
(RO) Report flags indicating various states of a
|
|
papr-pmem NVDIMM device. Each flag maps to a one or
|
|
more bits set in the dimm-health-bitmap retrieved in
|
|
response to H_SCM_HEALTH hcall. The details of the bit
|
|
flags returned in response to this hcall is available
|
|
at 'Documentation/powerpc/papr_hcalls.rst' . Below are
|
|
the flags reported in this sysfs file:
|
|
|
|
* "not_armed" : Indicates that NVDIMM contents will not
|
|
survive a power cycle.
|
|
* "flush_fail" : Indicates that NVDIMM contents
|
|
couldn't be flushed during last
|
|
shut-down event.
|
|
* "restore_fail": Indicates that NVDIMM contents
|
|
couldn't be restored during NVDIMM
|
|
initialization.
|
|
* "encrypted" : NVDIMM contents are encrypted.
|
|
* "smart_notify": There is health event for the NVDIMM.
|
|
* "scrubbed" : Indicating that contents of the
|
|
NVDIMM have been scrubbed.
|
|
* "locked" : Indicating that NVDIMM contents cant
|
|
be modified until next power cycle.
|