aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/include/asm/mce.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 365a594b41bc..5cdd8d100ec9 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -109,6 +109,12 @@ struct mce_log {
109extern int mce_disabled; 109extern int mce_disabled;
110extern int mce_p5_enabled; 110extern int mce_p5_enabled;
111 111
112#ifdef CONFIG_X86_MCE
113void mcheck_init(struct cpuinfo_x86 *c);
114#else
115static inline void mcheck_init(struct cpuinfo_x86 *c) {}
116#endif
117
112#ifdef CONFIG_X86_OLD_MCE 118#ifdef CONFIG_X86_OLD_MCE
113extern int nr_mce_banks; 119extern int nr_mce_banks;
114void amd_mcheck_init(struct cpuinfo_x86 *c); 120void amd_mcheck_init(struct cpuinfo_x86 *c);
@@ -126,13 +132,9 @@ static inline void winchip_mcheck_init(struct cpuinfo_x86 *c) {}
126static inline void enable_p5_mce(void) {} 132static inline void enable_p5_mce(void) {}
127#endif 133#endif
128 134
129/* Call the installed machine check handler for this CPU setup. */
130extern void (*machine_check_vector)(struct pt_regs *, long error_code);
131
132void mce_setup(struct mce *m); 135void mce_setup(struct mce *m);
133void mce_log(struct mce *m); 136void mce_log(struct mce *m);
134DECLARE_PER_CPU(struct sys_device, mce_dev); 137DECLARE_PER_CPU(struct sys_device, mce_dev);
135extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
136 138
137/* 139/*
138 * To support more than 128 would need to escape the predefined 140 * To support more than 128 would need to escape the predefined
@@ -169,8 +171,6 @@ DECLARE_PER_CPU(unsigned, mce_poll_count);
169 171
170extern atomic_t mce_entry; 172extern atomic_t mce_entry;
171 173
172void do_machine_check(struct pt_regs *, long);
173
174typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS); 174typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS);
175DECLARE_PER_CPU(mce_banks_t, mce_poll_banks); 175DECLARE_PER_CPU(mce_banks_t, mce_poll_banks);
176 176
@@ -187,13 +187,20 @@ void mce_notify_process(void);
187DECLARE_PER_CPU(struct mce, injectm); 187DECLARE_PER_CPU(struct mce, injectm);
188extern struct file_operations mce_chrdev_ops; 188extern struct file_operations mce_chrdev_ops;
189 189
190#ifdef CONFIG_X86_MCE 190/*
191void mcheck_init(struct cpuinfo_x86 *c); 191 * Exception handler
192#else 192 */
193#define mcheck_init(c) do { } while (0) 193
194#endif 194/* Call the installed machine check handler for this CPU setup. */
195extern void (*machine_check_vector)(struct pt_regs *, long error_code);
196void do_machine_check(struct pt_regs *, long);
197
198/*
199 * Threshold handler
200 */
195 201
196extern void (*mce_threshold_vector)(void); 202extern void (*mce_threshold_vector)(void);
203extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
197 204
198/* 205/*
199 * Thermal handler 206 * Thermal handler