linux/arch/powerpc/platforms
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
..
4xx powerpc/4xx: Don't unmap NULL mbase 2020-05-28 23:24:36 +10:00
8xx powerpc: bad_page_fault get registers from regs 2021-02-09 00:02:09 +11:00
40x powerpc: Remove IBM405 Erratum #77 2020-05-28 23:24:36 +10:00
44x powerpc/44x: fix spelling mistake in Kconfig "varients" -> "variants" 2021-04-23 01:38:04 +10:00
52xx powerpc/52xx: Add fallthrough in mpc52xx_wdt_ioctl() 2021-06-15 17:12:05 +10:00
82xx powerpc/82xx/*: Move PHB discovery 2021-02-09 00:02:06 +11:00
83xx powerpc/83xx: Fix build error when CONFIG_PCI=n 2021-02-11 23:28:51 +11:00
85xx powerpc/85xx: Fix declaration made after definition 2020-11-19 14:50:13 +11:00
86xx powerpc: Don't use 'struct ppc_inst' to reference instruction location 2021-06-17 00:09:00 +10:00
512x powerpc/512x: Move PHB discovery 2021-02-09 00:02:05 +11:00
amigaone powerpc/amigaone: Make amigaone_discover_phbs() static 2021-02-11 23:28:51 +11:00
book3s powerpc/vas: Move update_csb/dump_crb to common book3s platform 2021-06-20 21:58:56 +10:00
cell powerpc/spider-pci: Remove set but not used variable 'val' 2021-06-15 17:12:27 +10:00
chrp powerpc/chrp: Make hydra_init() static 2021-03-24 14:09:29 +11:00
embedded6xx powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
maple powerpc/pci: fix warning comparing pointer to 0 2021-03-29 13:22:13 +11:00
microwatt powerpc/microwatt: Add support for hardware random number generator 2021-06-21 21:16:32 +10:00
pasemi powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
powermac powerpc: Remove klimit 2021-06-25 00:07:10 +10:00
powernv powerpc/64s: avoid reloading (H)SRR registers if they are still valid 2021-06-25 00:06:55 +10:00
ps3 powerpc/ps3: Add dma_mask to ps3_dma_region 2021-06-10 21:44:58 +10:00
pseries powerpc/papr_scm: Add support for reporting dirty-shutdown-count 2021-06-25 14:47:18 +10:00
fsl_uli1575.c
Kconfig powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00
Kconfig.cputype powerpc/32s: Activate KUAP and KUEP by default 2021-06-17 00:09:08 +10:00
Makefile powerpc: Add Microwatt platform 2021-06-21 21:15:26 +10:00