diff options
| author | Andi Kleen <ak@linux.intel.com> | 2009-10-03 20:20:11 -0400 |
|---|---|---|
| committer | Andi Kleen <ak@linux.intel.com> | 2009-10-03 21:23:17 -0400 |
| commit | 1087e9b4ff708976499b4de541d9e1d57d49b60a (patch) | |
| tree | a370356b3f969b6081189d850d9a56921ed341c4 /include/linux | |
| parent | f0a221ef47df3cdde2123fe75ce3b61bb7df656d (diff) | |
HWPOISON: Clean up PR_MCE_KILL interface
While writing the manpage I noticed some shortcomings in the
current interface.
- Define symbolic names for all the different values
- Boundary check the kill mode values
- For symmetry add a get interface too. This allows library
code to get/set the current state.
- For consistency define a PR_MCE_KILL_DEFAULT value
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/prctl.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/prctl.h b/include/linux/prctl.h index 931150566ade..a3baeb2c2161 100644 --- a/include/linux/prctl.h +++ b/include/linux/prctl.h | |||
| @@ -88,6 +88,18 @@ | |||
| 88 | #define PR_TASK_PERF_EVENTS_DISABLE 31 | 88 | #define PR_TASK_PERF_EVENTS_DISABLE 31 |
| 89 | #define PR_TASK_PERF_EVENTS_ENABLE 32 | 89 | #define PR_TASK_PERF_EVENTS_ENABLE 32 |
| 90 | 90 | ||
| 91 | /* | ||
| 92 | * Set early/late kill mode for hwpoison memory corruption. | ||
| 93 | * This influences when the process gets killed on a memory corruption. | ||
| 94 | */ | ||
| 91 | #define PR_MCE_KILL 33 | 95 | #define PR_MCE_KILL 33 |
| 96 | # define PR_MCE_KILL_CLEAR 0 | ||
| 97 | # define PR_MCE_KILL_SET 1 | ||
| 98 | |||
| 99 | # define PR_MCE_KILL_LATE 0 | ||
| 100 | # define PR_MCE_KILL_EARLY 1 | ||
| 101 | # define PR_MCE_KILL_DEFAULT 2 | ||
| 102 | |||
| 103 | #define PR_MCE_KILL_GET 34 | ||
| 92 | 104 | ||
| 93 | #endif /* _LINUX_PRCTL_H */ | 105 | #endif /* _LINUX_PRCTL_H */ |
