From 0ead11181fe0c9538b185e46a494df21dc7de23a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 26 Sep 2018 10:47:15 -0700 Subject: acpi, nfit: Collect shutdown status Some NVDIMMs, in addition to providing an indication of whether the previous shutdown was clean, also provide a running count of lifetime dirty-shutdown events for the device. In anticipation of this functionality appearing on more devices arrange for the nfit driver to retrieve / cache this data at DIMM discovery time, and export it via sysfs. Reviewed-by: Keith Busch Signed-off-by: Dan Williams --- drivers/acpi/nfit/nfit.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/acpi/nfit/nfit.h') diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h index 111c3c437c80..af73aec547f2 100644 --- a/drivers/acpi/nfit/nfit.h +++ b/drivers/acpi/nfit/nfit.h @@ -162,6 +162,8 @@ struct nfit_memdev { enum nfit_mem_flags { NFIT_MEM_LSR, NFIT_MEM_LSW, + NFIT_MEM_DIRTY, + NFIT_MEM_DIRTY_COUNT, }; /* assembled tables for a given dimm/memory-device */ @@ -184,6 +186,7 @@ struct nfit_mem { struct resource *flush_wpq; unsigned long dsm_mask; unsigned long flags; + u32 dirty_shutdown; int family; }; -- cgit v1.2.3-55-g7522