diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2011-06-07 21:52:43 -0400 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-06-16 05:40:21 -0400 |
commit | 901d7691d3238ad68c80a567b88b1e5d614137fb (patch) | |
tree | cfe1c86de5de822f918f6a0fa9f4b52a90f92d62 | |
parent | 880a317abccf60b989951bf1515964cd73245970 (diff) |
x86, mce, severity: Make formatting a bit more readable
The table looks very complicated and hard to read for people other than
skilled developers. So let's clean it up a bit. At first, change format
to ease reading elements in the table.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/4DEED5EB.6050400@jp.fujitsu.com
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce-severity.c | 118 |
1 files changed, 88 insertions, 30 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c index 352d16a6c9b7..eaf5a43ff082 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-severity.c +++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c | |||
@@ -58,44 +58,102 @@ static struct severity { | |||
58 | #define MCI_UC_SAR (MCI_STATUS_UC|MCI_STATUS_S|MCI_STATUS_AR) | 58 | #define MCI_UC_SAR (MCI_STATUS_UC|MCI_STATUS_S|MCI_STATUS_AR) |
59 | #define MCACOD 0xffff | 59 | #define MCACOD 0xffff |
60 | 60 | ||
61 | BITCLR(MCI_STATUS_VAL, NO, "Invalid"), | 61 | BITCLR( |
62 | BITCLR(MCI_STATUS_EN, NO, "Not enabled"), | 62 | MCI_STATUS_VAL, |
63 | BITSET(MCI_STATUS_PCC, PANIC, "Processor context corrupt"), | 63 | NO, "Invalid" |
64 | ), | ||
65 | BITCLR( | ||
66 | MCI_STATUS_EN, | ||
67 | NO, "Not enabled" | ||
68 | ), | ||
69 | BITSET( | ||
70 | MCI_STATUS_PCC, | ||
71 | PANIC, "Processor context corrupt" | ||
72 | ), | ||
64 | /* When MCIP is not set something is very confused */ | 73 | /* When MCIP is not set something is very confused */ |
65 | MCGMASK(MCG_STATUS_MCIP, 0, PANIC, "MCIP not set in MCA handler"), | 74 | MCGMASK( |
75 | MCG_STATUS_MCIP, 0, | ||
76 | PANIC, "MCIP not set in MCA handler" | ||
77 | ), | ||
66 | /* Neither return not error IP -- no chance to recover -> PANIC */ | 78 | /* Neither return not error IP -- no chance to recover -> PANIC */ |
67 | MCGMASK(MCG_STATUS_RIPV|MCG_STATUS_EIPV, 0, PANIC, | 79 | MCGMASK( |
68 | "Neither restart nor error IP"), | 80 | MCG_STATUS_RIPV|MCG_STATUS_EIPV, 0, |
69 | MCGMASK(MCG_STATUS_RIPV, 0, PANIC, "In kernel and no restart IP", | 81 | PANIC, "Neither restart nor error IP" |
70 | KERNEL), | 82 | ), |
71 | BITCLR(MCI_STATUS_UC, KEEP, "Corrected error", NOSER), | 83 | MCGMASK( |
84 | MCG_STATUS_RIPV, 0, | ||
85 | PANIC, "In kernel and no restart IP", | ||
86 | KERNEL | ||
87 | ), | ||
88 | BITCLR( | ||
89 | MCI_STATUS_UC, | ||
90 | KEEP, "Corrected error", | ||
91 | NOSER | ||
92 | ), | ||
72 | 93 | ||
73 | /* ignore OVER for UCNA */ | 94 | /* ignore OVER for UCNA */ |
74 | MASK(MCI_UC_SAR, MCI_STATUS_UC, KEEP, | 95 | MASK( |
75 | "Uncorrected no action required", SER), | 96 | MCI_UC_SAR, MCI_STATUS_UC, |
76 | MASK(MCI_STATUS_OVER|MCI_UC_SAR, MCI_STATUS_UC|MCI_STATUS_AR, PANIC, | 97 | KEEP, "Uncorrected no action required", |
77 | "Illegal combination (UCNA with AR=1)", SER), | 98 | SER |
78 | MASK(MCI_STATUS_S, 0, KEEP, "Non signalled machine check", SER), | 99 | ), |
100 | MASK( | ||
101 | MCI_STATUS_OVER|MCI_UC_SAR, MCI_STATUS_UC|MCI_STATUS_AR, | ||
102 | PANIC, "Illegal combination (UCNA with AR=1)", | ||
103 | SER | ||
104 | ), | ||
105 | MASK( | ||
106 | MCI_STATUS_S, 0, | ||
107 | KEEP, "Non signalled machine check", | ||
108 | SER | ||
109 | ), | ||
79 | 110 | ||
80 | /* AR add known MCACODs here */ | 111 | /* AR add known MCACODs here */ |
81 | MASK(MCI_STATUS_OVER|MCI_UC_SAR, MCI_STATUS_OVER|MCI_UC_SAR, PANIC, | 112 | MASK( |
82 | "Action required with lost events", SER), | 113 | MCI_STATUS_OVER|MCI_UC_SAR, MCI_STATUS_OVER|MCI_UC_SAR, |
83 | MASK(MCI_STATUS_OVER|MCI_UC_SAR, MCI_UC_SAR, PANIC, | 114 | PANIC, "Action required with lost events", |
84 | "Action required; unknown MCACOD", SER), | 115 | SER |
116 | ), | ||
117 | MASK( | ||
118 | MCI_STATUS_OVER|MCI_UC_SAR, MCI_UC_SAR, | ||
119 | PANIC, "Action required; unknown MCACOD", | ||
120 | SER | ||
121 | ), | ||
85 | 122 | ||
86 | /* known AO MCACODs: */ | 123 | /* known AO MCACODs: */ |
87 | MASK(MCI_UC_SAR|MCI_STATUS_OVER|0xfff0, MCI_UC_S|0xc0, AO, | 124 | MASK( |
88 | "Action optional: memory scrubbing error", SER), | 125 | MCI_UC_SAR|MCI_STATUS_OVER|0xfff0, MCI_UC_S|0xc0, |
89 | MASK(MCI_UC_SAR|MCI_STATUS_OVER|MCACOD, MCI_UC_S|0x17a, AO, | 126 | AO, "Action optional: memory scrubbing error", |
90 | "Action optional: last level cache writeback error", SER), | 127 | SER |
91 | 128 | ), | |
92 | MASK(MCI_STATUS_OVER|MCI_UC_SAR, MCI_UC_S, SOME, | 129 | MASK( |
93 | "Action optional unknown MCACOD", SER), | 130 | MCI_UC_SAR|MCI_STATUS_OVER|MCACOD, MCI_UC_S|0x17a, |
94 | MASK(MCI_STATUS_OVER|MCI_UC_SAR, MCI_UC_S|MCI_STATUS_OVER, SOME, | 131 | AO, "Action optional: last level cache writeback error", |
95 | "Action optional with lost events", SER), | 132 | SER |
96 | BITSET(MCI_STATUS_UC|MCI_STATUS_OVER, PANIC, "Overflowed uncorrected"), | 133 | ), |
97 | BITSET(MCI_STATUS_UC, UC, "Uncorrected"), | 134 | |
98 | BITSET(0, SOME, "No match") /* always matches. keep at end */ | 135 | MASK( |
136 | MCI_STATUS_OVER|MCI_UC_SAR, MCI_UC_S, | ||
137 | SOME, "Action optional unknown MCACOD", | ||
138 | SER | ||
139 | ), | ||
140 | MASK( | ||
141 | MCI_STATUS_OVER|MCI_UC_SAR, MCI_UC_S|MCI_STATUS_OVER, | ||
142 | SOME, "Action optional with lost events", | ||
143 | SER | ||
144 | ), | ||
145 | BITSET( | ||
146 | MCI_STATUS_UC|MCI_STATUS_OVER, | ||
147 | PANIC, "Overflowed uncorrected" | ||
148 | ), | ||
149 | BITSET( | ||
150 | MCI_STATUS_UC, | ||
151 | UC, "Uncorrected" | ||
152 | ), | ||
153 | BITSET( | ||
154 | 0, | ||
155 | SOME, "No match" | ||
156 | ) /* always matches. keep at end */ | ||
99 | }; | 157 | }; |
100 | 158 | ||
101 | /* | 159 | /* |