From d203f0b82481abc048e134ee4d0ea3efbee77bb1 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Mon, 15 Oct 2012 18:03:57 +0200 Subject: x86, MCA: Convert dont_log_ce, banks and tolerant Move those MCA configuration variables into struct mca_config and adjust the places they're used accordingly. Signed-off-by: Borislav Petkov Acked-by: Tony Luck --- arch/x86/include/asm/mce.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arch/x86/include') diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 54d73b1..e4060de 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -119,6 +119,13 @@ struct mce_log { #define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) #ifdef __KERNEL__ + +struct mca_config { + bool dont_log_ce; + u8 banks; + int tolerant; +}; + extern void mce_register_decode_chain(struct notifier_block *nb); extern void mce_unregister_decode_chain(struct notifier_block *nb); -- cgit v1.1 From 84c2559dee2d69606f1fd4ce6563e79e7611a7b7 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Mon, 15 Oct 2012 19:59:18 +0200 Subject: x86, MCA: Convert rip_msr, mce_bootlog, monarch_timeout Move above configuration variables into struct mca_config and adjust usage places accordingly. Signed-off-by: Borislav Petkov Acked-by: Tony Luck --- arch/x86/include/asm/mce.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/x86/include') diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index e4060de..73ba185 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -123,7 +123,10 @@ struct mce_log { struct mca_config { bool dont_log_ce; u8 banks; + s8 bootlog; int tolerant; + int monarch_timeout; + u32 rip_msr; }; extern void mce_register_decode_chain(struct notifier_block *nb); -- cgit v1.1 From 7af19e4afdafa4adb5fffc569d5bb1c5e568ba98 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Mon, 15 Oct 2012 20:25:17 +0200 Subject: x86, MCA: Convert the next three variables batch Move them into the mca_config struct and adjust code touching them accordingly. Signed-off-by: Borislav Petkov Acked-by: Tony Luck --- arch/x86/include/asm/mce.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'arch/x86/include') diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 73ba185..a711e3f 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -122,13 +122,17 @@ struct mce_log { struct mca_config { bool dont_log_ce; + bool cmci_disabled; + bool ignore_ce; u8 banks; s8 bootlog; int tolerant; int monarch_timeout; + int panic_timeout; u32 rip_msr; }; +extern struct mca_config mca_cfg; extern void mce_register_decode_chain(struct notifier_block *nb); extern void mce_unregister_decode_chain(struct notifier_block *nb); @@ -169,8 +173,6 @@ DECLARE_PER_CPU(struct device *, mce_device); #define MAX_NR_BANKS 32 #ifdef CONFIG_X86_MCE_INTEL -extern int mce_cmci_disabled; -extern int mce_ignore_ce; extern int mce_bios_cmci_threshold; void mce_intel_feature_init(struct cpuinfo_x86 *c); void cmci_clear(void); -- cgit v1.1 From 1462594bf2866c1dc80066ed6f49f4331c551901 Mon Sep 17 00:00:00 2001 From: Borislav Petkov Date: Wed, 17 Oct 2012 12:05:33 +0200 Subject: x86, MCA: Finish mca_config conversion mce_ser, mce_bios_cmci_threshold and mce_disabled are the last three bools which need conversion. Move them to the mca_config struct and adjust usage sites accordingly. Signed-off-by: Borislav Petkov Acked-by: Tony Luck --- arch/x86/include/asm/mce.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'arch/x86/include') diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index a711e3f..d90c2fc 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -124,6 +124,9 @@ struct mca_config { bool dont_log_ce; bool cmci_disabled; bool ignore_ce; + bool disabled; + bool ser; + bool bios_cmci_threshold; u8 banks; s8 bootlog; int tolerant; @@ -140,7 +143,6 @@ extern void mce_unregister_decode_chain(struct notifier_block *nb); #include #include -extern int mce_disabled; extern int mce_p5_enabled; #ifdef CONFIG_X86_MCE @@ -173,7 +175,6 @@ DECLARE_PER_CPU(struct device *, mce_device); #define MAX_NR_BANKS 32 #ifdef CONFIG_X86_MCE_INTEL -extern int mce_bios_cmci_threshold; void mce_intel_feature_init(struct cpuinfo_x86 *c); void cmci_clear(void); void cmci_reenable(void); -- cgit v1.1