aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>2008-02-20 18:10:54 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:49 -0400
commit2c5847837fe76497934734330151f240f3e04925 (patch)
tree75524a229bb3cf2eaf618733d8f8f86fe5941936
parent4d46a89e7c867718020b2d5fd8f9e775293304be (diff)
x86: coding style fixes to arch/x86/kernel/cpu/mcheck/p6.c
Before: total: 16 errors, 13 warnings, 122 lines checked After: total: 0 errors, 0 warnings, 122 lines checked No code changed: arch/x86/kernel/cpu/mcheck/p6.o: text data bss dec hex filename 1082 0 8 1090 442 p6.o.before 1082 0 8 1090 442 p6.o.after md5: 4e283fbc1b68240f1724d9725007d379 p6.o.before.asm 4e283fbc1b68240f1724d9725007d379 p6.o.after.asm Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/cpu/mcheck/p6.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/p6.c b/arch/x86/kernel/cpu/mcheck/p6.c
index 74342604d30e..62efc9c2b3af 100644
--- a/arch/x86/kernel/cpu/mcheck/p6.c
+++ b/arch/x86/kernel/cpu/mcheck/p6.c
@@ -9,23 +9,23 @@
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/smp.h> 10#include <linux/smp.h>
11 11
12#include <asm/processor.h> 12#include <asm/processor.h>
13#include <asm/system.h> 13#include <asm/system.h>
14#include <asm/msr.h> 14#include <asm/msr.h>
15 15
16#include "mce.h" 16#include "mce.h"
17 17
18/* Machine Check Handler For PII/PIII */ 18/* Machine Check Handler For PII/PIII */
19static void intel_machine_check(struct pt_regs * regs, long error_code) 19static void intel_machine_check(struct pt_regs *regs, long error_code)
20{ 20{
21 int recover=1; 21 int recover = 1;
22 u32 alow, ahigh, high, low; 22 u32 alow, ahigh, high, low;
23 u32 mcgstl, mcgsth; 23 u32 mcgstl, mcgsth;
24 int i; 24 int i;
25 25
26 rdmsr (MSR_IA32_MCG_STATUS, mcgstl, mcgsth); 26 rdmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
27 if (mcgstl & (1<<0)) /* Recoverable ? */ 27 if (mcgstl & (1<<0)) /* Recoverable ? */
28 recover=0; 28 recover = 0;
29 29
30 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n", 30 printk(KERN_EMERG "CPU %d: Machine Check Exception: %08x%08x\n",
31 smp_processor_id(), mcgsth, mcgstl); 31 smp_processor_id(), mcgsth, mcgstl);
@@ -55,30 +55,30 @@ static void intel_machine_check(struct pt_regs * regs, long error_code)
55 } 55 }
56 56
57 if (recover & 2) 57 if (recover & 2)
58 panic ("CPU context corrupt"); 58 panic("CPU context corrupt");
59 if (recover & 1) 59 if (recover & 1)
60 panic ("Unable to continue"); 60 panic("Unable to continue");
61 61
62 printk (KERN_EMERG "Attempting to continue.\n"); 62 printk(KERN_EMERG "Attempting to continue.\n");
63 /* 63 /*
64 * Do not clear the MSR_IA32_MCi_STATUS if the error is not 64 * Do not clear the MSR_IA32_MCi_STATUS if the error is not
65 * recoverable/continuable.This will allow BIOS to look at the MSRs 65 * recoverable/continuable.This will allow BIOS to look at the MSRs
66 * for errors if the OS could not log the error. 66 * for errors if the OS could not log the error.
67 */ 67 */
68 for (i=0; i<nr_mce_banks; i++) { 68 for (i = 0; i < nr_mce_banks; i++) {
69 unsigned int msr; 69 unsigned int msr;
70 msr = MSR_IA32_MC0_STATUS+i*4; 70 msr = MSR_IA32_MC0_STATUS+i*4;
71 rdmsr (msr,low, high); 71 rdmsr(msr, low, high);
72 if (high & (1<<31)) { 72 if (high & (1<<31)) {
73 /* Clear it */ 73 /* Clear it */
74 wrmsr (msr, 0UL, 0UL); 74 wrmsr(msr, 0UL, 0UL);
75 /* Serialize */ 75 /* Serialize */
76 wmb(); 76 wmb();
77 add_taint(TAINT_MACHINE_CHECK); 77 add_taint(TAINT_MACHINE_CHECK);
78 } 78 }
79 } 79 }
80 mcgstl &= ~(1<<2); 80 mcgstl &= ~(1<<2);
81 wrmsr (MSR_IA32_MCG_STATUS,mcgstl, mcgsth); 81 wrmsr(MSR_IA32_MCG_STATUS, mcgstl, mcgsth);
82} 82}
83 83
84/* Set up machine check reporting for processors with Intel style MCE */ 84/* Set up machine check reporting for processors with Intel style MCE */
@@ -86,21 +86,21 @@ void intel_p6_mcheck_init(struct cpuinfo_x86 *c)
86{ 86{
87 u32 l, h; 87 u32 l, h;
88 int i; 88 int i;
89 89
90 /* Check for MCE support */ 90 /* Check for MCE support */
91 if (!cpu_has(c, X86_FEATURE_MCE)) 91 if (!cpu_has(c, X86_FEATURE_MCE))
92 return; 92 return;
93 93
94 /* Check for PPro style MCA */ 94 /* Check for PPro style MCA */
95 if (!cpu_has(c, X86_FEATURE_MCA)) 95 if (!cpu_has(c, X86_FEATURE_MCA))
96 return; 96 return;
97 97
98 /* Ok machine check is available */ 98 /* Ok machine check is available */
99 machine_check_vector = intel_machine_check; 99 machine_check_vector = intel_machine_check;
100 wmb(); 100 wmb();
101 101
102 printk (KERN_INFO "Intel machine check architecture supported.\n"); 102 printk(KERN_INFO "Intel machine check architecture supported.\n");
103 rdmsr (MSR_IA32_MCG_CAP, l, h); 103 rdmsr(MSR_IA32_MCG_CAP, l, h);
104 if (l & (1<<8)) /* Control register present ? */ 104 if (l & (1<<8)) /* Control register present ? */
105 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff); 105 wrmsr(MSR_IA32_MCG_CTL, 0xffffffff, 0xffffffff);
106 nr_mce_banks = l & 0xff; 106 nr_mce_banks = l & 0xff;
@@ -110,13 +110,13 @@ void intel_p6_mcheck_init(struct cpuinfo_x86 *c)
110 * - MC0_CTL should not be written 110 * - MC0_CTL should not be written
111 * - Status registers on all banks should be cleared on reset 111 * - Status registers on all banks should be cleared on reset
112 */ 112 */
113 for (i=1; i<nr_mce_banks; i++) 113 for (i = 1; i < nr_mce_banks; i++)
114 wrmsr (MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff); 114 wrmsr(MSR_IA32_MC0_CTL+4*i, 0xffffffff, 0xffffffff);
115 115
116 for (i=0; i<nr_mce_banks; i++) 116 for (i = 0; i < nr_mce_banks; i++)
117 wrmsr (MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0); 117 wrmsr(MSR_IA32_MC0_STATUS+4*i, 0x0, 0x0);
118 118
119 set_in_cr4 (X86_CR4_MCE); 119 set_in_cr4(X86_CR4_MCE);
120 printk (KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n", 120 printk(KERN_INFO "Intel machine check reporting enabled on CPU#%d.\n",
121 smp_processor_id()); 121 smp_processor_id());
122} 122}