diff options
author | Huang Ying <ying.huang@intel.com> | 2010-06-08 02:09:08 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-06-11 00:27:26 -0400 |
commit | 1f9a0bd4989fd16842ad71fc89240b48ab191446 (patch) | |
tree | 71d33c7503888bcbae670b8ce8824a2c367a6b58 /arch/x86 | |
parent | e44a21b7268a022c7749f521c06214145bd161e4 (diff) |
x86, mce: Rename MSR_IA32_MCx_CTL2 value
Rename CMCI_EN to MCI_CTL2_CMCI_EN and CMCI_THRESHOLD_MASK to
MCI_CTL2_CMCI_THRESHOLD_MASK to make naming consistent.
Signed-off-by: Huang Ying <ying.huang@intel.com>
LKML-Reference: <1275977348.3444.659.camel@yhuang-dev.sh.intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/mce.h | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/msr-index.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_intel.c | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index f32a4301c4d4..82db1d8f064b 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -38,6 +38,10 @@ | |||
38 | #define MCM_ADDR_MEM 3 /* memory address */ | 38 | #define MCM_ADDR_MEM 3 /* memory address */ |
39 | #define MCM_ADDR_GENERIC 7 /* generic */ | 39 | #define MCM_ADDR_GENERIC 7 /* generic */ |
40 | 40 | ||
41 | /* CTL2 register defines */ | ||
42 | #define MCI_CTL2_CMCI_EN (1ULL << 30) | ||
43 | #define MCI_CTL2_CMCI_THRESHOLD_MASK 0xffffULL | ||
44 | |||
41 | #define MCJ_CTX_MASK 3 | 45 | #define MCJ_CTX_MASK 3 |
42 | #define MCJ_CTX(flags) ((flags) & MCJ_CTX_MASK) | 46 | #define MCJ_CTX(flags) ((flags) & MCJ_CTX_MASK) |
43 | #define MCJ_CTX_RANDOM 0 /* inject context: random */ | 47 | #define MCJ_CTX_RANDOM 0 /* inject context: random */ |
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index b49d8ca228f6..38f66eb58541 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
@@ -94,9 +94,6 @@ | |||
94 | #define MSR_IA32_MC0_CTL2 0x00000280 | 94 | #define MSR_IA32_MC0_CTL2 0x00000280 |
95 | #define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x)) | 95 | #define MSR_IA32_MCx_CTL2(x) (MSR_IA32_MC0_CTL2 + (x)) |
96 | 96 | ||
97 | #define CMCI_EN (1ULL << 30) | ||
98 | #define CMCI_THRESHOLD_MASK 0xffffULL | ||
99 | |||
100 | #define MSR_P6_PERFCTR0 0x000000c1 | 97 | #define MSR_P6_PERFCTR0 0x000000c1 |
101 | #define MSR_P6_PERFCTR1 0x000000c2 | 98 | #define MSR_P6_PERFCTR1 0x000000c2 |
102 | #define MSR_P6_EVNTSEL0 0x00000186 | 99 | #define MSR_P6_EVNTSEL0 0x00000186 |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c index 62b48e40920a..faf7b2919a87 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c | |||
@@ -95,19 +95,19 @@ static void cmci_discover(int banks, int boot) | |||
95 | rdmsrl(MSR_IA32_MCx_CTL2(i), val); | 95 | rdmsrl(MSR_IA32_MCx_CTL2(i), val); |
96 | 96 | ||
97 | /* Already owned by someone else? */ | 97 | /* Already owned by someone else? */ |
98 | if (val & CMCI_EN) { | 98 | if (val & MCI_CTL2_CMCI_EN) { |
99 | if (test_and_clear_bit(i, owned) && !boot) | 99 | if (test_and_clear_bit(i, owned) && !boot) |
100 | print_update("SHD", &hdr, i); | 100 | print_update("SHD", &hdr, i); |
101 | __clear_bit(i, __get_cpu_var(mce_poll_banks)); | 101 | __clear_bit(i, __get_cpu_var(mce_poll_banks)); |
102 | continue; | 102 | continue; |
103 | } | 103 | } |
104 | 104 | ||
105 | val |= CMCI_EN | CMCI_THRESHOLD; | 105 | val |= MCI_CTL2_CMCI_EN | CMCI_THRESHOLD; |
106 | wrmsrl(MSR_IA32_MCx_CTL2(i), val); | 106 | wrmsrl(MSR_IA32_MCx_CTL2(i), val); |
107 | rdmsrl(MSR_IA32_MCx_CTL2(i), val); | 107 | rdmsrl(MSR_IA32_MCx_CTL2(i), val); |
108 | 108 | ||
109 | /* Did the enable bit stick? -- the bank supports CMCI */ | 109 | /* Did the enable bit stick? -- the bank supports CMCI */ |
110 | if (val & CMCI_EN) { | 110 | if (val & MCI_CTL2_CMCI_EN) { |
111 | if (!test_and_set_bit(i, owned) && !boot) | 111 | if (!test_and_set_bit(i, owned) && !boot) |
112 | print_update("CMCI", &hdr, i); | 112 | print_update("CMCI", &hdr, i); |
113 | __clear_bit(i, __get_cpu_var(mce_poll_banks)); | 113 | __clear_bit(i, __get_cpu_var(mce_poll_banks)); |
@@ -155,7 +155,7 @@ void cmci_clear(void) | |||
155 | continue; | 155 | continue; |
156 | /* Disable CMCI */ | 156 | /* Disable CMCI */ |
157 | rdmsrl(MSR_IA32_MCx_CTL2(i), val); | 157 | rdmsrl(MSR_IA32_MCx_CTL2(i), val); |
158 | val &= ~(CMCI_EN|CMCI_THRESHOLD_MASK); | 158 | val &= ~(MCI_CTL2_CMCI_EN|MCI_CTL2_CMCI_THRESHOLD_MASK); |
159 | wrmsrl(MSR_IA32_MCx_CTL2(i), val); | 159 | wrmsrl(MSR_IA32_MCx_CTL2(i), val); |
160 | __clear_bit(i, __get_cpu_var(mce_banks_owned)); | 160 | __clear_bit(i, __get_cpu_var(mce_banks_owned)); |
161 | } | 161 | } |