diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-06-15 04:27:47 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-06-16 19:56:10 -0400 |
commit | 58995d2d58e8e555bc92582abe7554921deea3aa (patch) | |
tree | 3919df735b3927bfc1e9b5a453b8979c73179b88 /arch | |
parent | 1149e7264528723b8c3b075a90386ceb2e07070a (diff) |
x86, mce: mce.h cleanup
Reorder definitions.
- static inline dummy mcheck_init() for !CONFIG_X86_MCE
- gather defs for exception, threshold handler
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/mce.h | 29 |
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 { | |||
109 | extern int mce_disabled; | 109 | extern int mce_disabled; |
110 | extern int mce_p5_enabled; | 110 | extern int mce_p5_enabled; |
111 | 111 | ||
112 | #ifdef CONFIG_X86_MCE | ||
113 | void mcheck_init(struct cpuinfo_x86 *c); | ||
114 | #else | ||
115 | static inline void mcheck_init(struct cpuinfo_x86 *c) {} | ||
116 | #endif | ||
117 | |||
112 | #ifdef CONFIG_X86_OLD_MCE | 118 | #ifdef CONFIG_X86_OLD_MCE |
113 | extern int nr_mce_banks; | 119 | extern int nr_mce_banks; |
114 | void amd_mcheck_init(struct cpuinfo_x86 *c); | 120 | void amd_mcheck_init(struct cpuinfo_x86 *c); |
@@ -126,13 +132,9 @@ static inline void winchip_mcheck_init(struct cpuinfo_x86 *c) {} | |||
126 | static inline void enable_p5_mce(void) {} | 132 | static inline void enable_p5_mce(void) {} |
127 | #endif | 133 | #endif |
128 | 134 | ||
129 | /* Call the installed machine check handler for this CPU setup. */ | ||
130 | extern void (*machine_check_vector)(struct pt_regs *, long error_code); | ||
131 | |||
132 | void mce_setup(struct mce *m); | 135 | void mce_setup(struct mce *m); |
133 | void mce_log(struct mce *m); | 136 | void mce_log(struct mce *m); |
134 | DECLARE_PER_CPU(struct sys_device, mce_dev); | 137 | DECLARE_PER_CPU(struct sys_device, mce_dev); |
135 | extern 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 | ||
170 | extern atomic_t mce_entry; | 172 | extern atomic_t mce_entry; |
171 | 173 | ||
172 | void do_machine_check(struct pt_regs *, long); | ||
173 | |||
174 | typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS); | 174 | typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS); |
175 | DECLARE_PER_CPU(mce_banks_t, mce_poll_banks); | 175 | DECLARE_PER_CPU(mce_banks_t, mce_poll_banks); |
176 | 176 | ||
@@ -187,13 +187,20 @@ void mce_notify_process(void); | |||
187 | DECLARE_PER_CPU(struct mce, injectm); | 187 | DECLARE_PER_CPU(struct mce, injectm); |
188 | extern struct file_operations mce_chrdev_ops; | 188 | extern struct file_operations mce_chrdev_ops; |
189 | 189 | ||
190 | #ifdef CONFIG_X86_MCE | 190 | /* |
191 | void 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. */ |
195 | extern void (*machine_check_vector)(struct pt_regs *, long error_code); | ||
196 | void do_machine_check(struct pt_regs *, long); | ||
197 | |||
198 | /* | ||
199 | * Threshold handler | ||
200 | */ | ||
195 | 201 | ||
196 | extern void (*mce_threshold_vector)(void); | 202 | extern void (*mce_threshold_vector)(void); |
203 | extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu); | ||
197 | 204 | ||
198 | /* | 205 | /* |
199 | * Thermal handler | 206 | * Thermal handler |