aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mcheck/mce.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/cpu/mcheck/mce.c')
-rw-r--r--arch/x86/kernel/cpu/mcheck/mce.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 0a687fd185e6..5623b4b5d511 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -7,6 +7,9 @@
7 * Copyright 2008 Intel Corporation 7 * Copyright 2008 Intel Corporation
8 * Author: Andi Kleen 8 * Author: Andi Kleen
9 */ 9 */
10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12
10#include <linux/thread_info.h> 13#include <linux/thread_info.h>
11#include <linux/capability.h> 14#include <linux/capability.h>
12#include <linux/miscdevice.h> 15#include <linux/miscdevice.h>
@@ -210,7 +213,7 @@ static void drain_mcelog_buffer(void)
210 cpu_relax(); 213 cpu_relax();
211 214
212 if (!m->finished && retries >= 4) { 215 if (!m->finished && retries >= 4) {
213 pr_err("MCE: skipping error being logged currently!\n"); 216 pr_err("skipping error being logged currently!\n");
214 break; 217 break;
215 } 218 }
216 } 219 }
@@ -1167,8 +1170,9 @@ int memory_failure(unsigned long pfn, int vector, int flags)
1167{ 1170{
1168 /* mce_severity() should not hand us an ACTION_REQUIRED error */ 1171 /* mce_severity() should not hand us an ACTION_REQUIRED error */
1169 BUG_ON(flags & MF_ACTION_REQUIRED); 1172 BUG_ON(flags & MF_ACTION_REQUIRED);
1170 printk(KERN_ERR "Uncorrected memory error in page 0x%lx ignored\n" 1173 pr_err("Uncorrected memory error in page 0x%lx ignored\n"
1171 "Rebuild kernel with CONFIG_MEMORY_FAILURE=y for smarter handling\n", pfn); 1174 "Rebuild kernel with CONFIG_MEMORY_FAILURE=y for smarter handling\n",
1175 pfn);
1172 1176
1173 return 0; 1177 return 0;
1174} 1178}
@@ -1358,11 +1362,10 @@ static int __cpuinit __mcheck_cpu_cap_init(void)
1358 1362
1359 b = cap & MCG_BANKCNT_MASK; 1363 b = cap & MCG_BANKCNT_MASK;
1360 if (!banks) 1364 if (!banks)
1361 printk(KERN_INFO "mce: CPU supports %d MCE banks\n", b); 1365 pr_info("CPU supports %d MCE banks\n", b);
1362 1366
1363 if (b > MAX_NR_BANKS) { 1367 if (b > MAX_NR_BANKS) {
1364 printk(KERN_WARNING 1368 pr_warn("Using only %u machine check banks out of %u\n",
1365 "MCE: Using only %u machine check banks out of %u\n",
1366 MAX_NR_BANKS, b); 1369 MAX_NR_BANKS, b);
1367 b = MAX_NR_BANKS; 1370 b = MAX_NR_BANKS;
1368 } 1371 }
@@ -1419,7 +1422,7 @@ static void __mcheck_cpu_init_generic(void)
1419static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c) 1422static int __cpuinit __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
1420{ 1423{
1421 if (c->x86_vendor == X86_VENDOR_UNKNOWN) { 1424 if (c->x86_vendor == X86_VENDOR_UNKNOWN) {
1422 pr_info("MCE: unknown CPU type - not enabling MCE support.\n"); 1425 pr_info("unknown CPU type - not enabling MCE support\n");
1423 return -EOPNOTSUPP; 1426 return -EOPNOTSUPP;
1424 } 1427 }
1425 1428
@@ -1574,7 +1577,7 @@ static void __mcheck_cpu_init_timer(void)
1574/* Handle unconfigured int18 (should never happen) */ 1577/* Handle unconfigured int18 (should never happen) */
1575static void unexpected_machine_check(struct pt_regs *regs, long error_code) 1578static void unexpected_machine_check(struct pt_regs *regs, long error_code)
1576{ 1579{
1577 printk(KERN_ERR "CPU#%d: Unexpected int18 (Machine Check).\n", 1580 pr_err("CPU#%d: Unexpected int18 (Machine Check)\n",
1578 smp_processor_id()); 1581 smp_processor_id());
1579} 1582}
1580 1583
@@ -1893,8 +1896,7 @@ static int __init mcheck_enable(char *str)
1893 get_option(&str, &monarch_timeout); 1896 get_option(&str, &monarch_timeout);
1894 } 1897 }
1895 } else { 1898 } else {
1896 printk(KERN_INFO "mce argument %s ignored. Please use /sys\n", 1899 pr_info("mce argument %s ignored. Please use /sys\n", str);
1897 str);
1898 return 0; 1900 return 0;
1899 } 1901 }
1900 return 1; 1902 return 1;