[PATCH 06/17] x86: MCE: Move mce_disabled option into common 64bit/64bit code

From: Andi Kleen
Date: Tue May 26 2009 - 19:19:56 EST


From: Andi Kleen <ak@xxxxxxxxxxxxxxx>

It's the same function, so let's share it.

Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/cpu/mcheck/mce.c | 29 +++++++++++------------------
1 files changed, 11 insertions(+), 18 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 9bbdd11..68c3329 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -909,16 +909,6 @@ static struct miscdevice mce_log_device = {
};

/*
- * Old style boot options parsing. Only for compatibility.
- */
-static int __init mcheck_disable(char *str)
-{
- mce_disabled = 1;
- return 1;
-}
-__setup("nomce", mcheck_disable);
-
-/*
* mce=off disables machine check
* mce=TOLERANCELEVEL (number, see above)
* mce=bootlog Log MCEs from before booting. Disabled by default on AMD.
@@ -1346,19 +1336,22 @@ void __init restart_mce(void)
set_in_cr4(X86_CR4_MCE);
}

-static int __init mcheck_disable(char *str)
-{
- mce_disabled = 1;
- return 1;
-}
-
static int __init mcheck_enable(char *str)
{
mce_disabled = -1;
return 1;
}

-__setup("nomce", mcheck_disable);
__setup("mce", mcheck_enable);

-#endif /* CONFIG_X86_32 */
+#endif /* CONFIG_X86_OLD_MCE */
+
+/*
+ * Old style boot options parsing. Only for compatibility.
+ */
+static int __init mcheck_disable(char *str)
+{
+ mce_disabled = 1;
+ return 1;
+}
+__setup("nomce", mcheck_disable);
--
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/