Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 spinlock update from Ingo Molnar:
"Convert an NMI lock to raw"

[ Clarification: it's not that the lock itself is NMI-safe, it's about
NMI registration called from RT contexts - Linus ]

* 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/nmi: Use raw lock

+9 -9
+9 -9
arch/x86/kernel/nmi.c
··· 39 39 #include <trace/events/nmi.h> 40 40 41 41 struct nmi_desc { 42 - spinlock_t lock; 42 + raw_spinlock_t lock; 43 43 struct list_head head; 44 44 }; 45 45 46 46 static struct nmi_desc nmi_desc[NMI_MAX] = 47 47 { 48 48 { 49 - .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[0].lock), 49 + .lock = __RAW_SPIN_LOCK_UNLOCKED(&nmi_desc[0].lock), 50 50 .head = LIST_HEAD_INIT(nmi_desc[0].head), 51 51 }, 52 52 { 53 - .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[1].lock), 53 + .lock = __RAW_SPIN_LOCK_UNLOCKED(&nmi_desc[1].lock), 54 54 .head = LIST_HEAD_INIT(nmi_desc[1].head), 55 55 }, 56 56 { 57 - .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[2].lock), 57 + .lock = __RAW_SPIN_LOCK_UNLOCKED(&nmi_desc[2].lock), 58 58 .head = LIST_HEAD_INIT(nmi_desc[2].head), 59 59 }, 60 60 { 61 - .lock = __SPIN_LOCK_UNLOCKED(&nmi_desc[3].lock), 61 + .lock = __RAW_SPIN_LOCK_UNLOCKED(&nmi_desc[3].lock), 62 62 .head = LIST_HEAD_INIT(nmi_desc[3].head), 63 63 }, 64 64 ··· 163 163 164 164 init_irq_work(&action->irq_work, nmi_max_handler); 165 165 166 - spin_lock_irqsave(&desc->lock, flags); 166 + raw_spin_lock_irqsave(&desc->lock, flags); 167 167 168 168 /* 169 169 * Indicate if there are multiple registrations on the ··· 181 181 else 182 182 list_add_tail_rcu(&action->list, &desc->head); 183 183 184 - spin_unlock_irqrestore(&desc->lock, flags); 184 + raw_spin_unlock_irqrestore(&desc->lock, flags); 185 185 return 0; 186 186 } 187 187 EXPORT_SYMBOL(__register_nmi_handler); ··· 192 192 struct nmiaction *n; 193 193 unsigned long flags; 194 194 195 - spin_lock_irqsave(&desc->lock, flags); 195 + raw_spin_lock_irqsave(&desc->lock, flags); 196 196 197 197 list_for_each_entry_rcu(n, &desc->head, list) { 198 198 /* ··· 207 207 } 208 208 } 209 209 210 - spin_unlock_irqrestore(&desc->lock, flags); 210 + raw_spin_unlock_irqrestore(&desc->lock, flags); 211 211 synchronize_rcu(); 212 212 } 213 213 EXPORT_SYMBOL_GPL(unregister_nmi_handler);