mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
0ead11181f
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 <keith.busch@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
39 lines
777 B
C
39 lines
777 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright(c) 2018 Intel Corporation. All rights reserved.
|
|
* Intel specific definitions for NVDIMM Firmware Interface Table - NFIT
|
|
*/
|
|
#ifndef _NFIT_INTEL_H_
|
|
#define _NFIT_INTEL_H_
|
|
|
|
#define ND_INTEL_SMART 1
|
|
|
|
#define ND_INTEL_SMART_SHUTDOWN_COUNT_VALID (1 << 5)
|
|
#define ND_INTEL_SMART_SHUTDOWN_VALID (1 << 10)
|
|
|
|
struct nd_intel_smart {
|
|
u32 status;
|
|
union {
|
|
struct {
|
|
u32 flags;
|
|
u8 reserved0[4];
|
|
u8 health;
|
|
u8 spares;
|
|
u8 life_used;
|
|
u8 alarm_flags;
|
|
u16 media_temperature;
|
|
u16 ctrl_temperature;
|
|
u32 shutdown_count;
|
|
u8 ait_status;
|
|
u16 pmic_temperature;
|
|
u8 reserved1[8];
|
|
u8 shutdown_state;
|
|
u32 vendor_size;
|
|
u8 vendor_data[92];
|
|
} __packed;
|
|
u8 data[128];
|
|
};
|
|
} __packed;
|
|
|
|
#endif
|