diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-03-26 04:39:20 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-05-28 12:24:09 -0400 |
commit | 13503fa9137d9708d52214e9506c671dbf2fbdce (patch) | |
tree | e0731de58ff42d9749ec84475cd29968b260cab4 /arch/x86/kernel/cpu | |
parent | b5c42bc8db17db80917f99205a03c51f17354495 (diff) |
x86, mce: Cleanup param parser
- Fix the comment formatting.
- The error path does not return 0, and printk lacks level and "\n".
- Move __setup("nomce") next to mcheck_disable().
- Improve readability etc.
[ Impact: cleanup ]
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
LKML-Reference: <49CB3F38.7090703@jp.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_64.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 6fb0b359d2a5..77effb55afe7 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -839,25 +839,29 @@ static int __init mcheck_disable(char *str) | |||
839 | mce_dont_init = 1; | 839 | mce_dont_init = 1; |
840 | return 1; | 840 | return 1; |
841 | } | 841 | } |
842 | __setup("nomce", mcheck_disable); | ||
842 | 843 | ||
843 | /* mce=off disables machine check. | 844 | /* |
844 | mce=TOLERANCELEVEL (number, see above) | 845 | * mce=off disables machine check |
845 | mce=bootlog Log MCEs from before booting. Disabled by default on AMD. | 846 | * mce=TOLERANCELEVEL (number, see above) |
846 | mce=nobootlog Don't log MCEs from before booting. */ | 847 | * mce=bootlog Log MCEs from before booting. Disabled by default on AMD. |
848 | * mce=nobootlog Don't log MCEs from before booting. | ||
849 | */ | ||
847 | static int __init mcheck_enable(char *str) | 850 | static int __init mcheck_enable(char *str) |
848 | { | 851 | { |
849 | if (!strcmp(str, "off")) | 852 | if (!strcmp(str, "off")) |
850 | mce_dont_init = 1; | 853 | mce_dont_init = 1; |
851 | else if (!strcmp(str, "bootlog") || !strcmp(str,"nobootlog")) | 854 | else if (!strcmp(str, "bootlog") || !strcmp(str, "nobootlog")) |
852 | mce_bootlog = str[0] == 'b'; | 855 | mce_bootlog = (str[0] == 'b'); |
853 | else if (isdigit(str[0])) | 856 | else if (isdigit(str[0])) |
854 | get_option(&str, &tolerant); | 857 | get_option(&str, &tolerant); |
855 | else | 858 | else { |
856 | printk("mce= argument %s ignored. Please use /sys", str); | 859 | printk(KERN_INFO "mce= argument %s ignored. Please use /sys\n", |
860 | str); | ||
861 | return 0; | ||
862 | } | ||
857 | return 1; | 863 | return 1; |
858 | } | 864 | } |
859 | |||
860 | __setup("nomce", mcheck_disable); | ||
861 | __setup("mce=", mcheck_enable); | 865 | __setup("mce=", mcheck_enable); |
862 | 866 | ||
863 | /* | 867 | /* |