diff options
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_intel_64.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c index d6b72df89d69..cef3ee30744b 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c | |||
@@ -151,10 +151,11 @@ static void print_update(char *type, int *hdr, int num) | |||
151 | static void cmci_discover(int banks, int boot) | 151 | static void cmci_discover(int banks, int boot) |
152 | { | 152 | { |
153 | unsigned long *owned = (void *)&__get_cpu_var(mce_banks_owned); | 153 | unsigned long *owned = (void *)&__get_cpu_var(mce_banks_owned); |
154 | unsigned long flags; | ||
154 | int hdr = 0; | 155 | int hdr = 0; |
155 | int i; | 156 | int i; |
156 | 157 | ||
157 | spin_lock(&cmci_discover_lock); | 158 | spin_lock_irqsave(&cmci_discover_lock, flags); |
158 | for (i = 0; i < banks; i++) { | 159 | for (i = 0; i < banks; i++) { |
159 | u64 val; | 160 | u64 val; |
160 | 161 | ||
@@ -184,7 +185,7 @@ static void cmci_discover(int banks, int boot) | |||
184 | WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks))); | 185 | WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks))); |
185 | } | 186 | } |
186 | } | 187 | } |
187 | spin_unlock(&cmci_discover_lock); | 188 | spin_unlock_irqrestore(&cmci_discover_lock, flags); |
188 | if (hdr) | 189 | if (hdr) |
189 | printk(KERN_CONT "\n"); | 190 | printk(KERN_CONT "\n"); |
190 | } | 191 | } |
@@ -211,13 +212,14 @@ void cmci_recheck(void) | |||
211 | */ | 212 | */ |
212 | void cmci_clear(void) | 213 | void cmci_clear(void) |
213 | { | 214 | { |
215 | unsigned long flags; | ||
214 | int i; | 216 | int i; |
215 | int banks; | 217 | int banks; |
216 | u64 val; | 218 | u64 val; |
217 | 219 | ||
218 | if (!cmci_supported(&banks)) | 220 | if (!cmci_supported(&banks)) |
219 | return; | 221 | return; |
220 | spin_lock(&cmci_discover_lock); | 222 | spin_lock_irqsave(&cmci_discover_lock, flags); |
221 | for (i = 0; i < banks; i++) { | 223 | for (i = 0; i < banks; i++) { |
222 | if (!test_bit(i, __get_cpu_var(mce_banks_owned))) | 224 | if (!test_bit(i, __get_cpu_var(mce_banks_owned))) |
223 | continue; | 225 | continue; |
@@ -227,7 +229,7 @@ void cmci_clear(void) | |||
227 | wrmsrl(MSR_IA32_MC0_CTL2 + i, val); | 229 | wrmsrl(MSR_IA32_MC0_CTL2 + i, val); |
228 | __clear_bit(i, __get_cpu_var(mce_banks_owned)); | 230 | __clear_bit(i, __get_cpu_var(mce_banks_owned)); |
229 | } | 231 | } |
230 | spin_unlock(&cmci_discover_lock); | 232 | spin_unlock_irqrestore(&cmci_discover_lock, flags); |
231 | } | 233 | } |
232 | 234 | ||
233 | /* | 235 | /* |