diff options
-rw-r--r-- | arch/x86/include/asm/mce.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 24 |
2 files changed, 7 insertions, 19 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index eb16e94ae04f..021979a6e23f 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -142,8 +142,6 @@ static inline void winchip_mcheck_init(struct cpuinfo_x86 *c) {} | |||
142 | static inline void enable_p5_mce(void) {} | 142 | static inline void enable_p5_mce(void) {} |
143 | #endif | 143 | #endif |
144 | 144 | ||
145 | extern void (*x86_mce_decode_callback)(struct mce *m); | ||
146 | |||
147 | void mce_setup(struct mce *m); | 145 | void mce_setup(struct mce *m); |
148 | void mce_log(struct mce *m); | 146 | void mce_log(struct mce *m); |
149 | DECLARE_PER_CPU(struct sys_device, mce_dev); | 147 | DECLARE_PER_CPU(struct sys_device, mce_dev); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 68e230327d65..ff1ae9b6464d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -105,20 +105,6 @@ static int cpu_missing; | |||
105 | ATOMIC_NOTIFIER_HEAD(x86_mce_decoder_chain); | 105 | ATOMIC_NOTIFIER_HEAD(x86_mce_decoder_chain); |
106 | EXPORT_SYMBOL_GPL(x86_mce_decoder_chain); | 106 | EXPORT_SYMBOL_GPL(x86_mce_decoder_chain); |
107 | 107 | ||
108 | static int default_decode_mce(struct notifier_block *nb, unsigned long val, | ||
109 | void *data) | ||
110 | { | ||
111 | pr_emerg(HW_ERR "No human readable MCE decoding support on this CPU type.\n"); | ||
112 | pr_emerg(HW_ERR "Run the message through 'mcelog --ascii' to decode.\n"); | ||
113 | |||
114 | return NOTIFY_STOP; | ||
115 | } | ||
116 | |||
117 | static struct notifier_block mce_dec_nb = { | ||
118 | .notifier_call = default_decode_mce, | ||
119 | .priority = -1, | ||
120 | }; | ||
121 | |||
122 | /* MCA banks polled by the period polling timer for corrected events */ | 108 | /* MCA banks polled by the period polling timer for corrected events */ |
123 | DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = { | 109 | DEFINE_PER_CPU(mce_banks_t, mce_poll_banks) = { |
124 | [0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL | 110 | [0 ... BITS_TO_LONGS(MAX_NR_BANKS)-1] = ~0UL |
@@ -212,6 +198,8 @@ void mce_log(struct mce *mce) | |||
212 | 198 | ||
213 | static void print_mce(struct mce *m) | 199 | static void print_mce(struct mce *m) |
214 | { | 200 | { |
201 | int ret = 0; | ||
202 | |||
215 | pr_emerg(HW_ERR "CPU %d: Machine Check Exception: %Lx Bank %d: %016Lx\n", | 203 | pr_emerg(HW_ERR "CPU %d: Machine Check Exception: %Lx Bank %d: %016Lx\n", |
216 | m->extcpu, m->mcgstatus, m->bank, m->status); | 204 | m->extcpu, m->mcgstatus, m->bank, m->status); |
217 | 205 | ||
@@ -239,7 +227,11 @@ static void print_mce(struct mce *m) | |||
239 | * Print out human-readable details about the MCE error, | 227 | * Print out human-readable details about the MCE error, |
240 | * (if the CPU has an implementation for that) | 228 | * (if the CPU has an implementation for that) |
241 | */ | 229 | */ |
242 | atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, m); | 230 | ret = atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, m); |
231 | if (ret == NOTIFY_STOP) | ||
232 | return; | ||
233 | |||
234 | pr_emerg_ratelimited(HW_ERR "Run the above through 'mcelog --ascii'\n"); | ||
243 | } | 235 | } |
244 | 236 | ||
245 | #define PANIC_TIMEOUT 5 /* 5 seconds */ | 237 | #define PANIC_TIMEOUT 5 /* 5 seconds */ |
@@ -1721,8 +1713,6 @@ __setup("mce", mcheck_enable); | |||
1721 | 1713 | ||
1722 | int __init mcheck_init(void) | 1714 | int __init mcheck_init(void) |
1723 | { | 1715 | { |
1724 | atomic_notifier_chain_register(&x86_mce_decoder_chain, &mce_dec_nb); | ||
1725 | |||
1726 | mcheck_intel_therm_init(); | 1716 | mcheck_intel_therm_init(); |
1727 | 1717 | ||
1728 | return 0; | 1718 | return 0; |