aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu
diff options
context:
space:
mode:
authorPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>2008-02-22 17:10:49 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:50 -0400
commit714a9ac2efe5e20fdccfcf91b27dbd384bd34685 (patch)
tree91febce4bcef5a4a968d432e09d0e65accd0238b /arch/x86/kernel/cpu
parent83e714e82f3434a32c3f54f7223f78345d873218 (diff)
x86: coding style fixes to arch/x86/kernel/cpu/mcheck/non-fatal.c
Before: total: 5 errors, 5 warnings, 91 lines checked After: total: 0 errors, 0 warnings, 94 lines checked No code changed: arch/x86/kernel/cpu/mcheck/non-fatal.o: text data bss dec hex filename 441 80 4 525 20d non-fatal.o.before 441 80 4 525 20d non-fatal.o.after md5: 137bc114d2020ad331d5e76444a2c7d3 non-fatal.o.before.asm 137bc114d2020ad331d5e76444a2c7d3 non-fatal.o.after.asm Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r--arch/x86/kernel/cpu/mcheck/non-fatal.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/non-fatal.c b/arch/x86/kernel/cpu/mcheck/non-fatal.c
index bf39409b3838..00ccb6c14ec2 100644
--- a/arch/x86/kernel/cpu/mcheck/non-fatal.c
+++ b/arch/x86/kernel/cpu/mcheck/non-fatal.c
@@ -16,7 +16,7 @@
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/module.h> 17#include <linux/module.h>
18 18
19#include <asm/processor.h> 19#include <asm/processor.h>
20#include <asm/system.h> 20#include <asm/system.h>
21#include <asm/msr.h> 21#include <asm/msr.h>
22 22
@@ -26,23 +26,26 @@ static int firstbank;
26 26
27#define MCE_RATE 15*HZ /* timer rate is 15s */ 27#define MCE_RATE 15*HZ /* timer rate is 15s */
28 28
29static void mce_checkregs (void *info) 29static void mce_checkregs(void *info)
30{ 30{
31 u32 low, high; 31 u32 low, high;
32 int i; 32 int i;
33 33
34 for (i=firstbank; i<nr_mce_banks; i++) { 34 for (i = firstbank; i < nr_mce_banks; i++) {
35 rdmsr (MSR_IA32_MC0_STATUS+i*4, low, high); 35 rdmsr(MSR_IA32_MC0_STATUS+i*4, low, high);
36 36
37 if (high & (1<<31)) { 37 if (high & (1<<31)) {
38 printk(KERN_INFO "MCE: The hardware reports a non " 38 printk(KERN_INFO "MCE: The hardware reports a non "
39 "fatal, correctable incident occurred on " 39 "fatal, correctable incident occurred on "
40 "CPU %d.\n", 40 "CPU %d.\n",
41 smp_processor_id()); 41 smp_processor_id());
42 printk (KERN_INFO "Bank %d: %08x%08x\n", i, high, low); 42 printk(KERN_INFO "Bank %d: %08x%08x\n", i, high, low);
43 43
44 /* Scrub the error so we don't pick it up in MCE_RATE seconds time. */ 44 /*
45 wrmsr (MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL); 45 * Scrub the error so we don't pick it up in MCE_RATE
46 * seconds time.
47 */
48 wrmsr(MSR_IA32_MC0_STATUS+i*4, 0UL, 0UL);
46 49
47 /* Serialize */ 50 /* Serialize */
48 wmb(); 51 wmb();
@@ -55,10 +58,10 @@ static void mce_work_fn(struct work_struct *work);
55static DECLARE_DELAYED_WORK(mce_work, mce_work_fn); 58static DECLARE_DELAYED_WORK(mce_work, mce_work_fn);
56 59
57static void mce_work_fn(struct work_struct *work) 60static void mce_work_fn(struct work_struct *work)
58{ 61{
59 on_each_cpu(mce_checkregs, NULL, 1, 1); 62 on_each_cpu(mce_checkregs, NULL, 1, 1);
60 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE)); 63 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
61} 64}
62 65
63static int __init init_nonfatal_mce_checker(void) 66static int __init init_nonfatal_mce_checker(void)
64{ 67{