Commit 58995d2d authored by Hidetoshi Seto's avatar Hidetoshi Seto Committed by H. Peter Anvin

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: default avatarHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 1149e726
...@@ -109,6 +109,12 @@ struct mce_log { ...@@ -109,6 +109,12 @@ struct mce_log {
extern int mce_disabled; extern int mce_disabled;
extern int mce_p5_enabled; extern int mce_p5_enabled;
#ifdef CONFIG_X86_MCE
void mcheck_init(struct cpuinfo_x86 *c);
#else
static inline void mcheck_init(struct cpuinfo_x86 *c) {}
#endif
#ifdef CONFIG_X86_OLD_MCE #ifdef CONFIG_X86_OLD_MCE
extern int nr_mce_banks; extern int nr_mce_banks;
void amd_mcheck_init(struct cpuinfo_x86 *c); void amd_mcheck_init(struct cpuinfo_x86 *c);
...@@ -126,13 +132,9 @@ static inline void winchip_mcheck_init(struct cpuinfo_x86 *c) {} ...@@ -126,13 +132,9 @@ static inline void winchip_mcheck_init(struct cpuinfo_x86 *c) {}
static inline void enable_p5_mce(void) {} static inline void enable_p5_mce(void) {}
#endif #endif
/* Call the installed machine check handler for this CPU setup. */
extern void (*machine_check_vector)(struct pt_regs *, long error_code);
void mce_setup(struct mce *m); void mce_setup(struct mce *m);
void mce_log(struct mce *m); void mce_log(struct mce *m);
DECLARE_PER_CPU(struct sys_device, mce_dev); DECLARE_PER_CPU(struct sys_device, mce_dev);
extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
/* /*
* To support more than 128 would need to escape the predefined * To support more than 128 would need to escape the predefined
...@@ -169,8 +171,6 @@ DECLARE_PER_CPU(unsigned, mce_poll_count); ...@@ -169,8 +171,6 @@ DECLARE_PER_CPU(unsigned, mce_poll_count);
extern atomic_t mce_entry; extern atomic_t mce_entry;
void do_machine_check(struct pt_regs *, long);
typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS); typedef DECLARE_BITMAP(mce_banks_t, MAX_NR_BANKS);
DECLARE_PER_CPU(mce_banks_t, mce_poll_banks); DECLARE_PER_CPU(mce_banks_t, mce_poll_banks);
...@@ -187,13 +187,20 @@ void mce_notify_process(void); ...@@ -187,13 +187,20 @@ void mce_notify_process(void);
DECLARE_PER_CPU(struct mce, injectm); DECLARE_PER_CPU(struct mce, injectm);
extern struct file_operations mce_chrdev_ops; extern struct file_operations mce_chrdev_ops;
#ifdef CONFIG_X86_MCE /*
void mcheck_init(struct cpuinfo_x86 *c); * Exception handler
#else */
#define mcheck_init(c) do { } while (0)
#endif /* Call the installed machine check handler for this CPU setup. */
extern void (*machine_check_vector)(struct pt_regs *, long error_code);
void do_machine_check(struct pt_regs *, long);
/*
* Threshold handler
*/
extern void (*mce_threshold_vector)(void); extern void (*mce_threshold_vector)(void);
extern void (*threshold_cpu_callback)(unsigned long action, unsigned int cpu);
/* /*
* Thermal handler * Thermal handler
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment