diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-07-15 14:28:02 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-07-20 19:11:56 +0200 |
commit | 5706af4a7052a5048f3e4a2cbc65ee66c71bdfa8 (patch) | |
tree | 808608ed05e8b16bb8bb1ddf3cc6d7330fcafc42 | |
parent | 5bbbedcfeec4fb13f514cabf4383b62c2e141f76 (diff) | |
download | lwn-5706af4a7052a5048f3e4a2cbc65ee66c71bdfa8.tar.gz lwn-5706af4a7052a5048f3e4a2cbc65ee66c71bdfa8.zip |
x86: mce: Convert cmci_discover_lock to raw_spinlock
cmci_discover_lock() is taken in atomic contexts (cpu bring
up). Convert it to a raw_spinlock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce_intel.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c index 7c785634af2b..10c063dc796e 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c @@ -27,7 +27,7 @@ static DEFINE_PER_CPU(mce_banks_t, mce_banks_owned); * cmci_discover_lock protects against parallel discovery attempts * which could race against each other. */ -static DEFINE_SPINLOCK(cmci_discover_lock); +static DEFINE_RAW_SPINLOCK(cmci_discover_lock); #define CMCI_THRESHOLD 1 @@ -84,7 +84,7 @@ static void cmci_discover(int banks, int boot) int hdr = 0; int i; - spin_lock_irqsave(&cmci_discover_lock, flags); + raw_spin_lock_irqsave(&cmci_discover_lock, flags); for (i = 0; i < banks; i++) { u64 val; @@ -114,7 +114,7 @@ static void cmci_discover(int banks, int boot) WARN_ON(!test_bit(i, __get_cpu_var(mce_poll_banks))); } } - spin_unlock_irqrestore(&cmci_discover_lock, flags); + raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); if (hdr) printk(KERN_CONT "\n"); } @@ -148,7 +148,7 @@ void cmci_clear(void) if (!cmci_supported(&banks)) return; - spin_lock_irqsave(&cmci_discover_lock, flags); + raw_spin_lock_irqsave(&cmci_discover_lock, flags); for (i = 0; i < banks; i++) { if (!test_bit(i, __get_cpu_var(mce_banks_owned))) continue; @@ -158,7 +158,7 @@ void cmci_clear(void) wrmsrl(MSR_IA32_MCx_CTL2(i), val); __clear_bit(i, __get_cpu_var(mce_banks_owned)); } - spin_unlock_irqrestore(&cmci_discover_lock, flags); + raw_spin_unlock_irqrestore(&cmci_discover_lock, flags); } /* |