diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 01213048f62f..fdd51b554355 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -183,6 +183,11 @@ void mce_log(struct mce *mce) | |||
183 | set_bit(0, &mce_need_notify); | 183 | set_bit(0, &mce_need_notify); |
184 | } | 184 | } |
185 | 185 | ||
186 | void __weak decode_mce(struct mce *m) | ||
187 | { | ||
188 | return; | ||
189 | } | ||
190 | |||
186 | static void print_mce(struct mce *m) | 191 | static void print_mce(struct mce *m) |
187 | { | 192 | { |
188 | printk(KERN_EMERG | 193 | printk(KERN_EMERG |
@@ -205,6 +210,8 @@ static void print_mce(struct mce *m) | |||
205 | printk(KERN_EMERG "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n", | 210 | printk(KERN_EMERG "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n", |
206 | m->cpuvendor, m->cpuid, m->time, m->socketid, | 211 | m->cpuvendor, m->cpuid, m->time, m->socketid, |
207 | m->apicid); | 212 | m->apicid); |
213 | |||
214 | decode_mce(m); | ||
208 | } | 215 | } |
209 | 216 | ||
210 | static void print_mce_head(void) | 217 | static void print_mce_head(void) |
@@ -215,7 +222,10 @@ static void print_mce_head(void) | |||
215 | static void print_mce_tail(void) | 222 | static void print_mce_tail(void) |
216 | { | 223 | { |
217 | printk(KERN_EMERG "This is not a software problem!\n" | 224 | printk(KERN_EMERG "This is not a software problem!\n" |
218 | "Run through mcelog --ascii to decode and contact your hardware vendor\n"); | 225 | #if (!defined(CONFIG_EDAC) || !defined(CONFIG_CPU_SUP_AMD)) |
226 | "Run through mcelog --ascii to decode and contact your hardware vendor\n" | ||
227 | #endif | ||
228 | ); | ||
219 | } | 229 | } |
220 | 230 | ||
221 | #define PANIC_TIMEOUT 5 /* 5 seconds */ | 231 | #define PANIC_TIMEOUT 5 /* 5 seconds */ |
@@ -1091,7 +1101,7 @@ void mce_log_therm_throt_event(__u64 status) | |||
1091 | */ | 1101 | */ |
1092 | static int check_interval = 5 * 60; /* 5 minutes */ | 1102 | static int check_interval = 5 * 60; /* 5 minutes */ |
1093 | 1103 | ||
1094 | static DEFINE_PER_CPU(int, next_interval); /* in jiffies */ | 1104 | static DEFINE_PER_CPU(int, mce_next_interval); /* in jiffies */ |
1095 | static DEFINE_PER_CPU(struct timer_list, mce_timer); | 1105 | static DEFINE_PER_CPU(struct timer_list, mce_timer); |
1096 | 1106 | ||
1097 | static void mcheck_timer(unsigned long data) | 1107 | static void mcheck_timer(unsigned long data) |
@@ -1110,7 +1120,7 @@ static void mcheck_timer(unsigned long data) | |||
1110 | * Alert userspace if needed. If we logged an MCE, reduce the | 1120 | * Alert userspace if needed. If we logged an MCE, reduce the |
1111 | * polling interval, otherwise increase the polling interval. | 1121 | * polling interval, otherwise increase the polling interval. |
1112 | */ | 1122 | */ |
1113 | n = &__get_cpu_var(next_interval); | 1123 | n = &__get_cpu_var(mce_next_interval); |
1114 | if (mce_notify_irq()) | 1124 | if (mce_notify_irq()) |
1115 | *n = max(*n/2, HZ/100); | 1125 | *n = max(*n/2, HZ/100); |
1116 | else | 1126 | else |
@@ -1325,7 +1335,7 @@ static void mce_cpu_features(struct cpuinfo_x86 *c) | |||
1325 | static void mce_init_timer(void) | 1335 | static void mce_init_timer(void) |
1326 | { | 1336 | { |
1327 | struct timer_list *t = &__get_cpu_var(mce_timer); | 1337 | struct timer_list *t = &__get_cpu_var(mce_timer); |
1328 | int *n = &__get_cpu_var(next_interval); | 1338 | int *n = &__get_cpu_var(mce_next_interval); |
1329 | 1339 | ||
1330 | if (mce_ignore_ce) | 1340 | if (mce_ignore_ce) |
1331 | return; | 1341 | return; |
@@ -1925,7 +1935,7 @@ mce_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
1925 | case CPU_DOWN_FAILED: | 1935 | case CPU_DOWN_FAILED: |
1926 | case CPU_DOWN_FAILED_FROZEN: | 1936 | case CPU_DOWN_FAILED_FROZEN: |
1927 | t->expires = round_jiffies(jiffies + | 1937 | t->expires = round_jiffies(jiffies + |
1928 | __get_cpu_var(next_interval)); | 1938 | __get_cpu_var(mce_next_interval)); |
1929 | add_timer_on(t, cpu); | 1939 | add_timer_on(t, cpu); |
1930 | smp_call_function_single(cpu, mce_reenable_cpu, &action, 1); | 1940 | smp_call_function_single(cpu, mce_reenable_cpu, &action, 1); |
1931 | break; | 1941 | break; |