linux/arch/powerpc/include/uapi/asm
Vaibhav Jain de21e1377c powerpc/papr_scm: Add support for reporting dirty-shutdown-count
Persistent memory devices like NVDIMMs can loose cached writes in case
something prevents flush on power-fail. Such situations are termed as
dirty shutdown and are exposed to applications as
last-shutdown-state (LSS) flag and a dirty-shutdown-counter(DSC) as
described at [1]. The latter being useful in conditions where multiple
applications want to detect a dirty shutdown event without racing with
one another.

PAPR-NVDIMMs have so far only exposed LSS style flags to indicate a
dirty-shutdown-state. This patch further adds support for DSC via the
"ibm,persistence-failed-count" device tree property of an NVDIMM. This
property is a monotonic increasing 64-bit counter thats an indication
of number of times an NVDIMM has encountered a dirty-shutdown event
causing persistence loss.

Since this value is not expected to change after system-boot hence
papr_scm reads & caches its value during NVDIMM probe and exposes it
as a PAPR sysfs attributed named 'dirty_shutdown' to match the name of
similarly named NFIT sysfs attribute. Also this value is available to
libnvdimm via PAPR_PDSM_HEALTH payload. 'struct nd_papr_pdsm_health'
has been extended to add a new member called 'dimm_dsc' presence of
which is indicated by the newly introduced PDSM_DIMM_DSC_VALID flag.

References:
[1] https://pmem.io/documents/Dirty_Shutdown_Handling-V1.0.pdf

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210624080621.252038-1-vaibhav@linux.ibm.com
2021-06-25 14:47:18 +10:00
..
Kbuild
auxvec.h
bitsperlong.h
bootx.h
bpf_perf_event.h
byteorder.h
cputable.h
eeh.h
elf.h
epapr_hcalls.h
errno.h powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h 2021-04-17 10:40:51 +10:00
fcntl.h
ioctl.h
ioctls.h
ipcbuf.h
kvm.h KVM: PPC: Book3S HV: Add infrastructure to support 2nd DAWR 2021-02-10 14:31:08 +11:00
kvm_para.h
mman.h
msgbuf.h
nvram.h
opal-prd.h
papr_pdsm.h powerpc/papr_scm: Add support for reporting dirty-shutdown-count 2021-06-25 14:47:18 +10:00
perf_event.h
perf_regs.h
posix_types.h powerpc/32: Remove powerpc specific definition of 'ptrdiff_t' 2021-04-08 21:17:46 +10:00
ps3fb.h
ptrace.h
sembuf.h
setup.h
shmbuf.h
sigcontext.h
signal.h
socket.h
spu_info.h
stat.h
swab.h
termbits.h
termios.h
tm.h
types.h
ucontext.h
unistd.h
vas-api.h powerpc/vas: Define QoS credit flag to allocate window 2021-06-20 21:58:56 +10:00