|
16 | 16 | #include <linux/nd.h> |
17 | 17 |
|
18 | 18 | #include <asm/plpar_wrappers.h> |
19 | | -#include <asm/papr_pdsm.h> |
| 19 | +#include <uapi/linux/papr_pdsm.h> |
| 20 | +#include <linux/papr_scm.h> |
20 | 21 | #include <asm/mce.h> |
21 | 22 | #include <asm/unaligned.h> |
22 | 23 | #include <linux/perf_event.h> |
|
29 | 30 | (1ul << ND_CMD_SET_CONFIG_DATA) | \ |
30 | 31 | (1ul << ND_CMD_CALL)) |
31 | 32 |
|
32 | | -/* DIMM health bitmap indicators */ |
33 | | -/* SCM device is unable to persist memory contents */ |
34 | | -#define PAPR_PMEM_UNARMED (1ULL << (63 - 0)) |
35 | | -/* SCM device failed to persist memory contents */ |
36 | | -#define PAPR_PMEM_SHUTDOWN_DIRTY (1ULL << (63 - 1)) |
37 | | -/* SCM device contents are persisted from previous IPL */ |
38 | | -#define PAPR_PMEM_SHUTDOWN_CLEAN (1ULL << (63 - 2)) |
39 | | -/* SCM device contents are not persisted from previous IPL */ |
40 | | -#define PAPR_PMEM_EMPTY (1ULL << (63 - 3)) |
41 | | -/* SCM device memory life remaining is critically low */ |
42 | | -#define PAPR_PMEM_HEALTH_CRITICAL (1ULL << (63 - 4)) |
43 | | -/* SCM device will be garded off next IPL due to failure */ |
44 | | -#define PAPR_PMEM_HEALTH_FATAL (1ULL << (63 - 5)) |
45 | | -/* SCM contents cannot persist due to current platform health status */ |
46 | | -#define PAPR_PMEM_HEALTH_UNHEALTHY (1ULL << (63 - 6)) |
47 | | -/* SCM device is unable to persist memory contents in certain conditions */ |
48 | | -#define PAPR_PMEM_HEALTH_NON_CRITICAL (1ULL << (63 - 7)) |
49 | | -/* SCM device is encrypted */ |
50 | | -#define PAPR_PMEM_ENCRYPTED (1ULL << (63 - 8)) |
51 | | -/* SCM device has been scrubbed and locked */ |
52 | | -#define PAPR_PMEM_SCRUBBED_AND_LOCKED (1ULL << (63 - 9)) |
53 | | - |
54 | | -/* Bits status indicators for health bitmap indicating unarmed dimm */ |
55 | | -#define PAPR_PMEM_UNARMED_MASK (PAPR_PMEM_UNARMED | \ |
56 | | - PAPR_PMEM_HEALTH_UNHEALTHY) |
57 | | - |
58 | | -/* Bits status indicators for health bitmap indicating unflushed dimm */ |
59 | | -#define PAPR_PMEM_BAD_SHUTDOWN_MASK (PAPR_PMEM_SHUTDOWN_DIRTY) |
60 | | - |
61 | | -/* Bits status indicators for health bitmap indicating unrestored dimm */ |
62 | | -#define PAPR_PMEM_BAD_RESTORE_MASK (PAPR_PMEM_EMPTY) |
63 | | - |
64 | | -/* Bit status indicators for smart event notification */ |
65 | | -#define PAPR_PMEM_SMART_EVENT_MASK (PAPR_PMEM_HEALTH_CRITICAL | \ |
66 | | - PAPR_PMEM_HEALTH_FATAL | \ |
67 | | - PAPR_PMEM_HEALTH_UNHEALTHY) |
68 | | - |
69 | | -#define PAPR_SCM_PERF_STATS_EYECATCHER __stringify(SCMSTATS) |
70 | | -#define PAPR_SCM_PERF_STATS_VERSION 0x1 |
71 | | - |
72 | 33 | /* Struct holding a single performance metric */ |
73 | 34 | struct papr_scm_perf_stat { |
74 | 35 | u8 stat_id[8]; |
|
0 commit comments