-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Dan Williams
committed
Oct 17, 2018
1 parent
6f07f86
commit 0ead111
Showing
5 changed files
with
118 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters