Commit 239007b8 authored by Thomas Gleixner's avatar Thomas Gleixner

genirq: Convert irq_desc.lock to raw_spinlock

Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Acked-by: default avatarIngo Molnar <mingo@elte.hu>
parent 9f5a5621
...@@ -81,7 +81,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -81,7 +81,7 @@ show_interrupts(struct seq_file *p, void *v)
#endif #endif
if (irq < ACTUAL_NR_IRQS) { if (irq < ACTUAL_NR_IRQS) {
spin_lock_irqsave(&irq_desc[irq].lock, flags); raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
action = irq_desc[irq].action; action = irq_desc[irq].action;
if (!action) if (!action)
goto unlock; goto unlock;
...@@ -105,7 +105,7 @@ show_interrupts(struct seq_file *p, void *v) ...@@ -105,7 +105,7 @@ show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
unlock: unlock:
spin_unlock_irqrestore(&irq_desc[irq].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
} else if (irq == ACTUAL_NR_IRQS) { } else if (irq == ACTUAL_NR_IRQS) {
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
seq_puts(p, "IPI: "); seq_puts(p, "IPI: ");
......
...@@ -26,9 +26,9 @@ extern int show_fiq_list(struct seq_file *, void *); ...@@ -26,9 +26,9 @@ extern int show_fiq_list(struct seq_file *, void *);
*/ */
#define do_bad_IRQ(irq,desc) \ #define do_bad_IRQ(irq,desc) \
do { \ do { \
spin_lock(&desc->lock); \ raw_spin_lock(&desc->lock); \
handle_bad_irq(irq, desc); \ handle_bad_irq(irq, desc); \
spin_unlock(&desc->lock); \ raw_spin_unlock(&desc->lock); \
} while(0) } while(0)
#endif #endif
...@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto unlock; goto unlock;
...@@ -84,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -84,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
unlock: unlock:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == NR_IRQS) {
#ifdef CONFIG_FIQ #ifdef CONFIG_FIQ
show_fiq_list(p, v); show_fiq_list(p, v);
...@@ -139,7 +139,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) ...@@ -139,7 +139,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
} }
desc = irq_desc + irq; desc = irq_desc + irq;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN; desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
if (iflags & IRQF_VALID) if (iflags & IRQF_VALID)
desc->status &= ~IRQ_NOREQUEST; desc->status &= ~IRQ_NOREQUEST;
...@@ -147,7 +147,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) ...@@ -147,7 +147,7 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
desc->status &= ~IRQ_NOPROBE; desc->status &= ~IRQ_NOPROBE;
if (!(iflags & IRQF_NOAUTOEN)) if (!(iflags & IRQF_NOAUTOEN))
desc->status &= ~IRQ_NOAUTOEN; desc->status &= ~IRQ_NOAUTOEN;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
void __init init_IRQ(void) void __init init_IRQ(void)
...@@ -166,9 +166,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu) ...@@ -166,9 +166,9 @@ static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)
{ {
pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu); pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->node, cpu);
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
desc->chip->set_affinity(irq, cpumask_of(cpu)); desc->chip->set_affinity(irq, cpumask_of(cpu));
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
/* /*
......
...@@ -66,7 +66,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) ...@@ -66,7 +66,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
struct irqaction *action; struct irqaction *action;
irqreturn_t action_ret; irqreturn_t action_ret;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
BUG_ON(desc->status & IRQ_INPROGRESS); BUG_ON(desc->status & IRQ_INPROGRESS);
...@@ -78,7 +78,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) ...@@ -78,7 +78,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
goto out_mask; goto out_mask;
desc->status |= IRQ_INPROGRESS; desc->status |= IRQ_INPROGRESS;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
...@@ -87,7 +87,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) ...@@ -87,7 +87,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
* Maybe this function should go to kernel/irq/chip.c? */ * Maybe this function should go to kernel/irq/chip.c? */
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
if (desc->status & IRQ_DISABLED) if (desc->status & IRQ_DISABLED)
...@@ -97,7 +97,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc) ...@@ -97,7 +97,7 @@ static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
/* ack unconditionally to unmask lower prio irqs */ /* ack unconditionally to unmask lower prio irqs */
desc->chip->ack(irq); desc->chip->ack(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
#define handle_irq handle_prio_irq #define handle_irq handle_prio_irq
#endif #endif
......
...@@ -51,7 +51,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -51,7 +51,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto unlock; goto unlock;
...@@ -66,7 +66,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -66,7 +66,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
unlock: unlock:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
return 0; return 0;
......
...@@ -23,7 +23,7 @@ void ack_bad_irq(unsigned int irq) ...@@ -23,7 +23,7 @@ void ack_bad_irq(unsigned int irq)
static struct irq_desc bad_irq_desc = { static struct irq_desc bad_irq_desc = {
.handle_irq = handle_bad_irq, .handle_irq = handle_bad_irq,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock), .lock = __RAW_SPIN_LOCK_UNLOCKED(bad_irq_desc.lock),
}; };
#ifdef CONFIG_CPUMASK_OFFSTACK #ifdef CONFIG_CPUMASK_OFFSTACK
...@@ -39,7 +39,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -39,7 +39,7 @@ int show_interrupts(struct seq_file *p, void *v)
unsigned long flags; unsigned long flags;
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == NR_IRQS) {
seq_printf(p, "NMI: "); seq_printf(p, "NMI: ");
for_each_online_cpu(j) for_each_online_cpu(j)
......
...@@ -1140,7 +1140,7 @@ void show_regs(struct pt_regs *fp) ...@@ -1140,7 +1140,7 @@ void show_regs(struct pt_regs *fp)
if (fp->ipend & ~0x3F) { if (fp->ipend & ~0x3F) {
for (i = 0; i < (NR_IRQS - 1); i++) { for (i = 0; i < (NR_IRQS - 1); i++) {
if (!in_atomic) if (!in_atomic)
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
...@@ -1155,7 +1155,7 @@ void show_regs(struct pt_regs *fp) ...@@ -1155,7 +1155,7 @@ void show_regs(struct pt_regs *fp)
verbose_printk("\n"); verbose_printk("\n");
unlock: unlock:
if (!in_atomic) if (!in_atomic)
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
} }
......
...@@ -52,7 +52,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -52,7 +52,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
return 0; return 0;
} }
......
...@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -69,7 +69,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (action) { if (action) {
seq_printf(p, "%3d: ", i); seq_printf(p, "%3d: ", i);
...@@ -85,7 +85,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -85,7 +85,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
} }
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == NR_IRQS) {
seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count));
} }
......
...@@ -186,7 +186,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -186,7 +186,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_puts(p, " CPU0"); seq_puts(p, " CPU0");
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto unlock; goto unlock;
...@@ -200,7 +200,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -200,7 +200,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_printf(p, ", %s", action->name); seq_printf(p, ", %s", action->name);
seq_putc(p, '\n'); seq_putc(p, '\n');
unlock: unlock:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
return 0; return 0;
} }
......
...@@ -793,12 +793,12 @@ iosapic_register_intr (unsigned int gsi, ...@@ -793,12 +793,12 @@ iosapic_register_intr (unsigned int gsi,
goto unlock_iosapic_lock; goto unlock_iosapic_lock;
} }
spin_lock(&irq_desc[irq].lock); raw_spin_lock(&irq_desc[irq].lock);
dest = get_target_cpu(gsi, irq); dest = get_target_cpu(gsi, irq);
dmode = choose_dmode(); dmode = choose_dmode();
err = register_intr(gsi, irq, dmode, polarity, trigger); err = register_intr(gsi, irq, dmode, polarity, trigger);
if (err < 0) { if (err < 0) {
spin_unlock(&irq_desc[irq].lock); raw_spin_unlock(&irq_desc[irq].lock);
irq = err; irq = err;
goto unlock_iosapic_lock; goto unlock_iosapic_lock;
} }
...@@ -817,7 +817,7 @@ iosapic_register_intr (unsigned int gsi, ...@@ -817,7 +817,7 @@ iosapic_register_intr (unsigned int gsi,
(polarity == IOSAPIC_POL_HIGH ? "high" : "low"), (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),
cpu_logical_id(dest), dest, irq_to_vector(irq)); cpu_logical_id(dest), dest, irq_to_vector(irq));
spin_unlock(&irq_desc[irq].lock); raw_spin_unlock(&irq_desc[irq].lock);
unlock_iosapic_lock: unlock_iosapic_lock:
spin_unlock_irqrestore(&iosapic_lock, flags); spin_unlock_irqrestore(&iosapic_lock, flags);
return irq; return irq;
......
...@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -71,7 +71,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -91,7 +91,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -91,7 +91,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) } else if (i == NR_IRQS)
seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
return 0; return 0;
......
...@@ -345,7 +345,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id) ...@@ -345,7 +345,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
desc = irq_desc + irq; desc = irq_desc + irq;
cfg = irq_cfg + irq; cfg = irq_cfg + irq;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (!cfg->move_cleanup_count) if (!cfg->move_cleanup_count)
goto unlock; goto unlock;
...@@ -358,7 +358,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id) ...@@ -358,7 +358,7 @@ static irqreturn_t smp_irq_move_cleanup_interrupt(int irq, void *dev_id)
spin_unlock_irqrestore(&vector_lock, flags); spin_unlock_irqrestore(&vector_lock, flags);
cfg->move_cleanup_count--; cfg->move_cleanup_count--;
unlock: unlock:
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -40,7 +40,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -40,7 +40,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -59,7 +59,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -59,7 +59,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
return 0; return 0;
} }
......
...@@ -68,7 +68,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -68,7 +68,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < nr_irq) { if (i < nr_irq) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -89,7 +89,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -89,7 +89,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
return 0; return 0;
} }
...@@ -99,7 +99,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -99,7 +99,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -118,7 +118,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -118,7 +118,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == NR_IRQS) {
seq_putc(p, '\n'); seq_putc(p, '\n');
seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count)); seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
......
...@@ -159,9 +159,9 @@ void vr41xx_enable_piuint(uint16_t mask) ...@@ -159,9 +159,9 @@ void vr41xx_enable_piuint(uint16_t mask)
if (current_cpu_type() == CPU_VR4111 || if (current_cpu_type() == CPU_VR4111 ||
current_cpu_type() == CPU_VR4121) { current_cpu_type() == CPU_VR4121) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_set(MPIUINTREG, mask); icu1_set(MPIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -174,9 +174,9 @@ void vr41xx_disable_piuint(uint16_t mask) ...@@ -174,9 +174,9 @@ void vr41xx_disable_piuint(uint16_t mask)
if (current_cpu_type() == CPU_VR4111 || if (current_cpu_type() == CPU_VR4111 ||
current_cpu_type() == CPU_VR4121) { current_cpu_type() == CPU_VR4121) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_clear(MPIUINTREG, mask); icu1_clear(MPIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -189,9 +189,9 @@ void vr41xx_enable_aiuint(uint16_t mask) ...@@ -189,9 +189,9 @@ void vr41xx_enable_aiuint(uint16_t mask)
if (current_cpu_type() == CPU_VR4111 || if (current_cpu_type() == CPU_VR4111 ||
current_cpu_type() == CPU_VR4121) { current_cpu_type() == CPU_VR4121) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_set(MAIUINTREG, mask); icu1_set(MAIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -204,9 +204,9 @@ void vr41xx_disable_aiuint(uint16_t mask) ...@@ -204,9 +204,9 @@ void vr41xx_disable_aiuint(uint16_t mask)
if (current_cpu_type() == CPU_VR4111 || if (current_cpu_type() == CPU_VR4111 ||
current_cpu_type() == CPU_VR4121) { current_cpu_type() == CPU_VR4121) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_clear(MAIUINTREG, mask); icu1_clear(MAIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -219,9 +219,9 @@ void vr41xx_enable_kiuint(uint16_t mask) ...@@ -219,9 +219,9 @@ void vr41xx_enable_kiuint(uint16_t mask)
if (current_cpu_type() == CPU_VR4111 || if (current_cpu_type() == CPU_VR4111 ||
current_cpu_type() == CPU_VR4121) { current_cpu_type() == CPU_VR4121) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_set(MKIUINTREG, mask); icu1_set(MKIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -234,9 +234,9 @@ void vr41xx_disable_kiuint(uint16_t mask) ...@@ -234,9 +234,9 @@ void vr41xx_disable_kiuint(uint16_t mask)
if (current_cpu_type() == CPU_VR4111 || if (current_cpu_type() == CPU_VR4111 ||
current_cpu_type() == CPU_VR4121) { current_cpu_type() == CPU_VR4121) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_clear(MKIUINTREG, mask); icu1_clear(MKIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -247,9 +247,9 @@ void vr41xx_enable_macint(uint16_t mask) ...@@ -247,9 +247,9 @@ void vr41xx_enable_macint(uint16_t mask)
struct irq_desc *desc = irq_desc + ETHERNET_IRQ; struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_set(MMACINTREG, mask); icu1_set(MMACINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL(vr41xx_enable_macint); EXPORT_SYMBOL(vr41xx_enable_macint);
...@@ -259,9 +259,9 @@ void vr41xx_disable_macint(uint16_t mask) ...@@ -259,9 +259,9 @@ void vr41xx_disable_macint(uint16_t mask)
struct irq_desc *desc = irq_desc + ETHERNET_IRQ; struct irq_desc *desc = irq_desc + ETHERNET_IRQ;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_clear(MMACINTREG, mask); icu1_clear(MMACINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL(vr41xx_disable_macint); EXPORT_SYMBOL(vr41xx_disable_macint);
...@@ -271,9 +271,9 @@ void vr41xx_enable_dsiuint(uint16_t mask) ...@@ -271,9 +271,9 @@ void vr41xx_enable_dsiuint(uint16_t mask)
struct irq_desc *desc = irq_desc + DSIU_IRQ; struct irq_desc *desc = irq_desc + DSIU_IRQ;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_set(MDSIUINTREG, mask); icu1_set(MDSIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL(vr41xx_enable_dsiuint); EXPORT_SYMBOL(vr41xx_enable_dsiuint);
...@@ -283,9 +283,9 @@ void vr41xx_disable_dsiuint(uint16_t mask) ...@@ -283,9 +283,9 @@ void vr41xx_disable_dsiuint(uint16_t mask)
struct irq_desc *desc = irq_desc + DSIU_IRQ; struct irq_desc *desc = irq_desc + DSIU_IRQ;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu1_clear(MDSIUINTREG, mask); icu1_clear(MDSIUINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL(vr41xx_disable_dsiuint); EXPORT_SYMBOL(vr41xx_disable_dsiuint);
...@@ -295,9 +295,9 @@ void vr41xx_enable_firint(uint16_t mask) ...@@ -295,9 +295,9 @@ void vr41xx_enable_firint(uint16_t mask)
struct irq_desc *desc = irq_desc + FIR_IRQ; struct irq_desc *desc = irq_desc + FIR_IRQ;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_set(MFIRINTREG, mask); icu2_set(MFIRINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL(vr41xx_enable_firint); EXPORT_SYMBOL(vr41xx_enable_firint);
...@@ -307,9 +307,9 @@ void vr41xx_disable_firint(uint16_t mask) ...@@ -307,9 +307,9 @@ void vr41xx_disable_firint(uint16_t mask)
struct irq_desc *desc = irq_desc + FIR_IRQ; struct irq_desc *desc = irq_desc + FIR_IRQ;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_clear(MFIRINTREG, mask); icu2_clear(MFIRINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL(vr41xx_disable_firint); EXPORT_SYMBOL(vr41xx_disable_firint);
...@@ -322,9 +322,9 @@ void vr41xx_enable_pciint(void) ...@@ -322,9 +322,9 @@ void vr41xx_enable_pciint(void)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_write(MPCIINTREG, PCIINT0); icu2_write(MPCIINTREG, PCIINT0);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -338,9 +338,9 @@ void vr41xx_disable_pciint(void) ...@@ -338,9 +338,9 @@ void vr41xx_disable_pciint(void)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_write(MPCIINTREG, 0); icu2_write(MPCIINTREG, 0);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -354,9 +354,9 @@ void vr41xx_enable_scuint(void) ...@@ -354,9 +354,9 @@ void vr41xx_enable_scuint(void)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_write(MSCUINTREG, SCUINT0); icu2_write(MSCUINTREG, SCUINT0);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -370,9 +370,9 @@ void vr41xx_disable_scuint(void) ...@@ -370,9 +370,9 @@ void vr41xx_disable_scuint(void)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_write(MSCUINTREG, 0); icu2_write(MSCUINTREG, 0);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -386,9 +386,9 @@ void vr41xx_enable_csiint(uint16_t mask) ...@@ -386,9 +386,9 @@ void vr41xx_enable_csiint(uint16_t mask)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_set(MCSIINTREG, mask); icu2_set(MCSIINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -402,9 +402,9 @@ void vr41xx_disable_csiint(uint16_t mask) ...@@ -402,9 +402,9 @@ void vr41xx_disable_csiint(uint16_t mask)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_clear(MCSIINTREG, mask); icu2_clear(MCSIINTREG, mask);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -418,9 +418,9 @@ void vr41xx_enable_bcuint(void) ...@@ -418,9 +418,9 @@ void vr41xx_enable_bcuint(void)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_write(MBCUINTREG, BCUINTR); icu2_write(MBCUINTREG, BCUINTR);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -434,9 +434,9 @@ void vr41xx_disable_bcuint(void) ...@@ -434,9 +434,9 @@ void vr41xx_disable_bcuint(void)
if (current_cpu_type() == CPU_VR4122 || if (current_cpu_type() == CPU_VR4122 ||
current_cpu_type() == CPU_VR4131 || current_cpu_type() == CPU_VR4131 ||
current_cpu_type() == CPU_VR4133) { current_cpu_type() == CPU_VR4133) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
icu2_write(MBCUINTREG, 0); icu2_write(MBCUINTREG, 0);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
...@@ -486,7 +486,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) ...@@ -486,7 +486,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
pin = SYSINT1_IRQ_TO_PIN(irq); pin = SYSINT1_IRQ_TO_PIN(irq);
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
intassign0 = icu1_read(INTASSIGN0); intassign0 = icu1_read(INTASSIGN0);
intassign1 = icu1_read(INTASSIGN1); intassign1 = icu1_read(INTASSIGN1);
...@@ -525,7 +525,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) ...@@ -525,7 +525,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
intassign1 |= (uint16_t)assign << 9; intassign1 |= (uint16_t)assign << 9;
break; break;
default: default:
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
return -EINVAL; return -EINVAL;
} }
...@@ -533,7 +533,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) ...@@ -533,7 +533,7 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign)
icu1_write(INTASSIGN0, intassign0); icu1_write(INTASSIGN0, intassign0);
icu1_write(INTASSIGN1, intassign1); icu1_write(INTASSIGN1, intassign1);
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
return 0; return 0;
} }
...@@ -546,7 +546,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) ...@@ -546,7 +546,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
pin = SYSINT2_IRQ_TO_PIN(irq); pin = SYSINT2_IRQ_TO_PIN(irq);
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
intassign2 = icu1_read(INTASSIGN2); intassign2 = icu1_read(INTASSIGN2);
intassign3 = icu1_read(INTASSIGN3); intassign3 = icu1_read(INTASSIGN3);
...@@ -593,7 +593,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) ...@@ -593,7 +593,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
intassign3 |= (uint16_t)assign << 12; intassign3 |= (uint16_t)assign << 12;
break; break;
default: default:
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
return -EINVAL; return -EINVAL;
} }
...@@ -601,7 +601,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) ...@@ -601,7 +601,7 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign)
icu1_write(INTASSIGN2, intassign2); icu1_write(INTASSIGN2, intassign2);
icu1_write(INTASSIGN3, intassign3); icu1_write(INTASSIGN3, intassign3);
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
return 0; return 0;
} }
......
...@@ -215,7 +215,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -215,7 +215,7 @@ int show_interrupts(struct seq_file *p, void *v)
/* display information rows, one per active CPU */ /* display information rows, one per active CPU */
case 1 ... NR_IRQS - 1: case 1 ... NR_IRQS - 1:
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (action) { if (action) {
...@@ -235,7 +235,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -235,7 +235,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
} }
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
break; break;
/* polish off with NMI and error counters */ /* polish off with NMI and error counters */
......
...@@ -180,7 +180,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -180,7 +180,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (i < NR_IRQS) { if (i < NR_IRQS) {
struct irqaction *action; struct irqaction *action;
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -224,7 +224,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -224,7 +224,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} }
return 0; return 0;
......
...@@ -210,7 +210,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -210,7 +210,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!desc) if (!desc)
return 0; return 0;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
action = desc->action; action = desc->action;
if (!action || !action->handler) if (!action || !action->handler)
...@@ -237,7 +237,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -237,7 +237,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
...@@ -1112,7 +1112,7 @@ static int virq_debug_show(struct seq_file *m, void *private) ...@@ -1112,7 +1112,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
if (!desc) if (!desc)
continue; continue;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
if (desc->action && desc->action->handler) { if (desc->action && desc->action->handler) {
seq_printf(m, "%5d ", i); seq_printf(m, "%5d ", i);
...@@ -1131,7 +1131,7 @@ static int virq_debug_show(struct seq_file *m, void *private) ...@@ -1131,7 +1131,7 @@ static int virq_debug_show(struct seq_file *m, void *private)
seq_printf(m, "%s\n", p); seq_printf(m, "%s\n", p);
} }
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
return 0; return 0;
......
...@@ -86,9 +86,9 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) ...@@ -86,9 +86,9 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc)
u32 status, enable; u32 status, enable;
/* Mask off the cascaded IRQ */ /* Mask off the cascaded IRQ */
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->chip->mask(virq); desc->chip->mask(virq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
/* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs
* are pending. 'ffs()' is 1 based */ * are pending. 'ffs()' is 1 based */
...@@ -104,11 +104,11 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc) ...@@ -104,11 +104,11 @@ void media5200_irq_cascade(unsigned int virq, struct irq_desc *desc)
} }
/* Processing done; can reenable the cascade now */ /* Processing done; can reenable the cascade now */
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->chip->ack(virq); desc->chip->ack(virq);
if (!(desc->status & IRQ_DISABLED)) if (!(desc->status & IRQ_DISABLED))
desc->chip->unmask(virq); desc->chip->unmask(virq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
static int media5200_irq_map(struct irq_host *h, unsigned int virq, static int media5200_irq_map(struct irq_host *h, unsigned int virq,
......
...@@ -237,7 +237,7 @@ extern int noirqdebug; ...@@ -237,7 +237,7 @@ extern int noirqdebug;
static void handle_iic_irq(unsigned int irq, struct irq_desc *desc) static void handle_iic_irq(unsigned int irq, struct irq_desc *desc)
{ {
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
...@@ -265,18 +265,18 @@ static void handle_iic_irq(unsigned int irq, struct irq_desc *desc) ...@@ -265,18 +265,18 @@ static void handle_iic_irq(unsigned int irq, struct irq_desc *desc)
goto out_eoi; goto out_eoi;
desc->status &= ~IRQ_PENDING; desc->status &= ~IRQ_PENDING;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
} while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
out_eoi: out_eoi:
desc->chip->eoi(irq); desc->chip->eoi(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
static int iic_host_map(struct irq_host *h, unsigned int virq, static int iic_host_map(struct irq_host *h, unsigned int virq,
......
...@@ -217,9 +217,9 @@ void __init iSeries_activate_IRQs() ...@@ -217,9 +217,9 @@ void __init iSeries_activate_IRQs()
struct irq_desc *desc = irq_to_desc(irq); struct irq_desc *desc = irq_to_desc(irq);
if (desc && desc->chip && desc->chip->startup) { if (desc && desc->chip && desc->chip->startup) {
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->chip->startup(irq); desc->chip->startup(irq);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
} }
......
...@@ -906,7 +906,7 @@ void xics_migrate_irqs_away(void) ...@@ -906,7 +906,7 @@ void xics_migrate_irqs_away(void)
|| desc->chip->set_affinity == NULL) || desc->chip->set_affinity == NULL)
continue; continue;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq); status = rtas_call(ibm_get_xive, 1, 3, xics_status, irq);
if (status) { if (status) {
...@@ -930,7 +930,7 @@ void xics_migrate_irqs_away(void) ...@@ -930,7 +930,7 @@ void xics_migrate_irqs_away(void)
cpumask_setall(irq_to_desc(virq)->affinity); cpumask_setall(irq_to_desc(virq)->affinity);
desc->chip->set_affinity(virq, cpu_all_mask); desc->chip->set_affinity(virq, cpu_all_mask);
unlock: unlock:
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
#endif #endif
...@@ -173,7 +173,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) ...@@ -173,7 +173,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc)
u32 intr_index; u32 intr_index;
u32 have_shift = 0; u32 have_shift = 0;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) { if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) {
if (desc->chip->mask_ack) if (desc->chip->mask_ack)
desc->chip->mask_ack(irq); desc->chip->mask_ack(irq);
...@@ -225,7 +225,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) ...@@ -225,7 +225,7 @@ static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc)
break; break;
} }
unlock: unlock:
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
static int __devinit fsl_of_msi_probe(struct of_device *dev, static int __devinit fsl_of_msi_probe(struct of_device *dev,
......
...@@ -225,12 +225,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc) ...@@ -225,12 +225,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
int src; int src;
int subvirq; int subvirq;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (desc->status & IRQ_LEVEL) if (desc->status & IRQ_LEVEL)
desc->chip->mask(virq); desc->chip->mask(virq);
else else
desc->chip->mask_ack(virq); desc->chip->mask_ack(virq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
msr = mfdcr(uic->dcrbase + UIC_MSR); msr = mfdcr(uic->dcrbase + UIC_MSR);
if (!msr) /* spurious interrupt */ if (!msr) /* spurious interrupt */
...@@ -242,12 +242,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc) ...@@ -242,12 +242,12 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc *desc)
generic_handle_irq(subvirq); generic_handle_irq(subvirq);
uic_irq_ret: uic_irq_ret:
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (desc->status & IRQ_LEVEL) if (desc->status & IRQ_LEVEL)
desc->chip->ack(virq); desc->chip->ack(virq);
if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
desc->chip->unmask(virq); desc->chip->unmask(virq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
static struct uic * __init uic_init_one(struct device_node *node) static struct uic * __init uic_init_one(struct device_node *node)
......
...@@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -76,7 +76,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!desc) if (!desc)
return 0; return 0;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
for_each_online_cpu(j) for_each_online_cpu(j)
any_count |= kstat_irqs_cpu(i, j); any_count |= kstat_irqs_cpu(i, j);
action = desc->action; action = desc->action;
...@@ -97,7 +97,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -97,7 +97,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
out: out:
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
#endif #endif
......
...@@ -176,7 +176,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -176,7 +176,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -195,7 +195,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -195,7 +195,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == NR_IRQS) {
seq_printf(p, "NMI: "); seq_printf(p, "NMI: ");
for_each_online_cpu(j) for_each_online_cpu(j)
...@@ -785,14 +785,14 @@ void fixup_irqs(void) ...@@ -785,14 +785,14 @@ void fixup_irqs(void)
for (irq = 0; irq < NR_IRQS; irq++) { for (irq = 0; irq < NR_IRQS; irq++) {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&irq_desc[irq].lock, flags); raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
if (irq_desc[irq].action && if (irq_desc[irq].action &&
!(irq_desc[irq].status & IRQ_PER_CPU)) { !(irq_desc[irq].status & IRQ_PER_CPU)) {
if (irq_desc[irq].chip->set_affinity) if (irq_desc[irq].chip->set_affinity)
irq_desc[irq].chip->set_affinity(irq, irq_desc[irq].chip->set_affinity(irq,
irq_desc[irq].affinity); irq_desc[irq].affinity);
} }
spin_unlock_irqrestore(&irq_desc[irq].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
} }
tick_ops->disable_irq(); tick_ops->disable_irq();
......
...@@ -34,7 +34,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -34,7 +34,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -53,7 +53,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) } else if (i == NR_IRQS)
seq_putc(p, '\n'); seq_putc(p, '\n');
......
...@@ -2431,7 +2431,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) ...@@ -2431,7 +2431,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
continue; continue;
cfg = irq_cfg(irq); cfg = irq_cfg(irq);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain)) if (vector == cfg->vector && cpumask_test_cpu(me, cfg->domain))
goto unlock; goto unlock;
...@@ -2450,7 +2450,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) ...@@ -2450,7 +2450,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
} }
__get_cpu_var(vector_irq)[vector] = -1; __get_cpu_var(vector_irq)[vector] = -1;
unlock: unlock:
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
irq_exit(); irq_exit();
......
...@@ -149,7 +149,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -149,7 +149,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (!desc) if (!desc)
return 0; return 0;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
for_each_online_cpu(j) for_each_online_cpu(j)
any_count |= kstat_irqs_cpu(i, j); any_count |= kstat_irqs_cpu(i, j);
action = desc->action; action = desc->action;
...@@ -170,7 +170,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -170,7 +170,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
out: out:
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
...@@ -294,12 +294,12 @@ void fixup_irqs(void) ...@@ -294,12 +294,12 @@ void fixup_irqs(void)
continue; continue;
/* interrupt's are disabled at this point */ /* interrupt's are disabled at this point */
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
affinity = desc->affinity; affinity = desc->affinity;
if (!irq_has_action(irq) || if (!irq_has_action(irq) ||
cpumask_equal(affinity, cpu_online_mask)) { cpumask_equal(affinity, cpu_online_mask)) {
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
continue; continue;
} }
...@@ -326,7 +326,7 @@ void fixup_irqs(void) ...@@ -326,7 +326,7 @@ void fixup_irqs(void)
if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->unmask) if (!(desc->status & IRQ_MOVE_PCNTXT) && desc->chip->unmask)
desc->chip->unmask(irq); desc->chip->unmask(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
if (break_affinity && set_affinity) if (break_affinity && set_affinity)
printk("Broke affinity for irq %i\n", irq); printk("Broke affinity for irq %i\n", irq);
...@@ -356,10 +356,10 @@ void fixup_irqs(void) ...@@ -356,10 +356,10 @@ void fixup_irqs(void)
irq = __get_cpu_var(vector_irq)[vector]; irq = __get_cpu_var(vector_irq)[vector];
desc = irq_to_desc(irq); desc = irq_to_desc(irq);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (desc->chip->retrigger) if (desc->chip->retrigger)
desc->chip->retrigger(irq); desc->chip->retrigger(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
} }
} }
......
...@@ -90,7 +90,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -90,7 +90,7 @@ int show_interrupts(struct seq_file *p, void *v)
} }
if (i < NR_IRQS) { if (i < NR_IRQS) {
spin_lock_irqsave(&irq_desc[i].lock, flags); raw_spin_lock_irqsave(&irq_desc[i].lock, flags);
action = irq_desc[i].action; action = irq_desc[i].action;
if (!action) if (!action)
goto skip; goto skip;
...@@ -109,7 +109,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -109,7 +109,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == NR_IRQS) {
seq_printf(p, "NMI: "); seq_printf(p, "NMI: ");
for_each_online_cpu(j) for_each_online_cpu(j)
......
...@@ -192,7 +192,7 @@ struct irq_desc { ...@@ -192,7 +192,7 @@ struct irq_desc {
unsigned int irq_count; /* For detecting broken IRQs */ unsigned int irq_count; /* For detecting broken IRQs */
unsigned long last_unhandled; /* Aging timer for unhandled count */ unsigned long last_unhandled; /* Aging timer for unhandled count */
unsigned int irqs_unhandled; unsigned int irqs_unhandled;
spinlock_t lock; raw_spinlock_t lock;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
cpumask_var_t affinity; cpumask_var_t affinity;
unsigned int node; unsigned int node;
......
...@@ -45,7 +45,7 @@ unsigned long probe_irq_on(void) ...@@ -45,7 +45,7 @@ unsigned long probe_irq_on(void)
* flush such a longstanding irq before considering it as spurious. * flush such a longstanding irq before considering it as spurious.
*/ */
for_each_irq_desc_reverse(i, desc) { for_each_irq_desc_reverse(i, desc) {
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
if (!desc->action && !(desc->status & IRQ_NOPROBE)) { if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
/* /*
* An old-style architecture might still have * An old-style architecture might still have
...@@ -61,7 +61,7 @@ unsigned long probe_irq_on(void) ...@@ -61,7 +61,7 @@ unsigned long probe_irq_on(void)
desc->chip->set_type(i, IRQ_TYPE_PROBE); desc->chip->set_type(i, IRQ_TYPE_PROBE);
desc->chip->startup(i); desc->chip->startup(i);
} }
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
/* Wait for longstanding interrupts to trigger. */ /* Wait for longstanding interrupts to trigger. */
...@@ -73,13 +73,13 @@ unsigned long probe_irq_on(void) ...@@ -73,13 +73,13 @@ unsigned long probe_irq_on(void)
* happened in the previous stage, it may have masked itself) * happened in the previous stage, it may have masked itself)
*/ */
for_each_irq_desc_reverse(i, desc) { for_each_irq_desc_reverse(i, desc) {
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
if (!desc->action && !(desc->status & IRQ_NOPROBE)) { if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
desc->status |= IRQ_AUTODETECT | IRQ_WAITING; desc->status |= IRQ_AUTODETECT | IRQ_WAITING;
if (desc->chip->startup(i)) if (desc->chip->startup(i))
desc->status |= IRQ_PENDING; desc->status |= IRQ_PENDING;
} }
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
/* /*
...@@ -91,7 +91,7 @@ unsigned long probe_irq_on(void) ...@@ -91,7 +91,7 @@ unsigned long probe_irq_on(void)
* Now filter out any obviously spurious interrupts * Now filter out any obviously spurious interrupts
*/ */
for_each_irq_desc(i, desc) { for_each_irq_desc(i, desc) {
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
status = desc->status; status = desc->status;
if (status & IRQ_AUTODETECT) { if (status & IRQ_AUTODETECT) {
...@@ -103,7 +103,7 @@ unsigned long probe_irq_on(void) ...@@ -103,7 +103,7 @@ unsigned long probe_irq_on(void)
if (i < 32) if (i < 32)
mask |= 1 << i; mask |= 1 << i;
} }
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
return mask; return mask;
...@@ -129,7 +129,7 @@ unsigned int probe_irq_mask(unsigned long val) ...@@ -129,7 +129,7 @@ unsigned int probe_irq_mask(unsigned long val)
int i; int i;
for_each_irq_desc(i, desc) { for_each_irq_desc(i, desc) {
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
status = desc->status; status = desc->status;
if (status & IRQ_AUTODETECT) { if (status & IRQ_AUTODETECT) {
...@@ -139,7 +139,7 @@ unsigned int probe_irq_mask(unsigned long val) ...@@ -139,7 +139,7 @@ unsigned int probe_irq_mask(unsigned long val)
desc->status = status & ~IRQ_AUTODETECT; desc->status = status & ~IRQ_AUTODETECT;
desc->chip->shutdown(i); desc->chip->shutdown(i);
} }
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
mutex_unlock(&probing_active); mutex_unlock(&probing_active);
...@@ -171,7 +171,7 @@ int probe_irq_off(unsigned long val) ...@@ -171,7 +171,7 @@ int probe_irq_off(unsigned long val)
unsigned int status; unsigned int status;
for_each_irq_desc(i, desc) { for_each_irq_desc(i, desc) {
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
status = desc->status; status = desc->status;
if (status & IRQ_AUTODETECT) { if (status & IRQ_AUTODETECT) {
...@@ -183,7 +183,7 @@ int probe_irq_off(unsigned long val) ...@@ -183,7 +183,7 @@ int probe_irq_off(unsigned long val)
desc->status = status & ~IRQ_AUTODETECT; desc->status = status & ~IRQ_AUTODETECT;
desc->chip->shutdown(i); desc->chip->shutdown(i);
} }
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
mutex_unlock(&probing_active); mutex_unlock(&probing_active);
......
...@@ -34,7 +34,7 @@ void dynamic_irq_init(unsigned int irq) ...@@ -34,7 +34,7 @@ void dynamic_irq_init(unsigned int irq)
} }
/* Ensure we don't have left over values from a previous use of this irq */ /* Ensure we don't have left over values from a previous use of this irq */
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->status = IRQ_DISABLED; desc->status = IRQ_DISABLED;
desc->chip = &no_irq_chip; desc->chip = &no_irq_chip;
desc->handle_irq = handle_bad_irq; desc->handle_irq = handle_bad_irq;
...@@ -51,7 +51,7 @@ void dynamic_irq_init(unsigned int irq) ...@@ -51,7 +51,7 @@ void dynamic_irq_init(unsigned int irq)
cpumask_clear(desc->pending_mask); cpumask_clear(desc->pending_mask);
#endif #endif
#endif #endif
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
/** /**
...@@ -68,9 +68,9 @@ void dynamic_irq_cleanup(unsigned int irq) ...@@ -68,9 +68,9 @@ void dynamic_irq_cleanup(unsigned int irq)
return; return;
} }
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
if (desc->action) { if (desc->action) {
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
WARN(1, KERN_ERR "Destroying IRQ%d without calling free_irq\n", WARN(1, KERN_ERR "Destroying IRQ%d without calling free_irq\n",
irq); irq);
return; return;
...@@ -82,7 +82,7 @@ void dynamic_irq_cleanup(unsigned int irq) ...@@ -82,7 +82,7 @@ void dynamic_irq_cleanup(unsigned int irq)
desc->chip = &no_irq_chip; desc->chip = &no_irq_chip;
desc->name = NULL; desc->name = NULL;
clear_kstat_irqs(desc); clear_kstat_irqs(desc);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
...@@ -104,10 +104,10 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip) ...@@ -104,10 +104,10 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip)
if (!chip) if (!chip)
chip = &no_irq_chip; chip = &no_irq_chip;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
irq_chip_set_defaults(chip); irq_chip_set_defaults(chip);
desc->chip = chip; desc->chip = chip;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
...@@ -133,9 +133,9 @@ int set_irq_type(unsigned int irq, unsigned int type) ...@@ -133,9 +133,9 @@ int set_irq_type(unsigned int irq, unsigned int type)
if (type == IRQ_TYPE_NONE) if (type == IRQ_TYPE_NONE)
return 0; return 0;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
ret = __irq_set_trigger(desc, irq, type); ret = __irq_set_trigger(desc, irq, type);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret; return ret;
} }
EXPORT_SYMBOL(set_irq_type); EXPORT_SYMBOL(set_irq_type);
...@@ -158,9 +158,9 @@ int set_irq_data(unsigned int irq, void *data) ...@@ -158,9 +158,9 @@ int set_irq_data(unsigned int irq, void *data)
return -EINVAL; return -EINVAL;
} }
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->handler_data = data; desc->handler_data = data;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
EXPORT_SYMBOL(set_irq_data); EXPORT_SYMBOL(set_irq_data);
...@@ -183,11 +183,11 @@ int set_irq_msi(unsigned int irq, struct msi_desc *entry) ...@@ -183,11 +183,11 @@ int set_irq_msi(unsigned int irq, struct msi_desc *entry)
return -EINVAL; return -EINVAL;
} }
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->msi_desc = entry; desc->msi_desc = entry;
if (entry) if (entry)
entry->irq = irq; entry->irq = irq;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
...@@ -214,9 +214,9 @@ int set_irq_chip_data(unsigned int irq, void *data) ...@@ -214,9 +214,9 @@ int set_irq_chip_data(unsigned int irq, void *data)
return -EINVAL; return -EINVAL;
} }
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->chip_data = data; desc->chip_data = data;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
...@@ -241,12 +241,12 @@ void set_irq_nested_thread(unsigned int irq, int nest) ...@@ -241,12 +241,12 @@ void set_irq_nested_thread(unsigned int irq, int nest)
if (!desc) if (!desc)
return; return;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
if (nest) if (nest)
desc->status |= IRQ_NESTED_THREAD; desc->status |= IRQ_NESTED_THREAD;
else else
desc->status &= ~IRQ_NESTED_THREAD; desc->status &= ~IRQ_NESTED_THREAD;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
EXPORT_SYMBOL_GPL(set_irq_nested_thread); EXPORT_SYMBOL_GPL(set_irq_nested_thread);
...@@ -343,7 +343,7 @@ void handle_nested_irq(unsigned int irq) ...@@ -343,7 +343,7 @@ void handle_nested_irq(unsigned int irq)
might_sleep(); might_sleep();
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
kstat_incr_irqs_this_cpu(irq, desc); kstat_incr_irqs_this_cpu(irq, desc);
...@@ -352,17 +352,17 @@ void handle_nested_irq(unsigned int irq) ...@@ -352,17 +352,17 @@ void handle_nested_irq(unsigned int irq)
goto out_unlock; goto out_unlock;
desc->status |= IRQ_INPROGRESS; desc->status |= IRQ_INPROGRESS;
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
action_ret = action->thread_fn(action->irq, action->dev_id); action_ret = action->thread_fn(action->irq, action->dev_id);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
out_unlock: out_unlock:
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} }
EXPORT_SYMBOL_GPL(handle_nested_irq); EXPORT_SYMBOL_GPL(handle_nested_irq);
...@@ -384,7 +384,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc) ...@@ -384,7 +384,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
struct irqaction *action; struct irqaction *action;
irqreturn_t action_ret; irqreturn_t action_ret;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (unlikely(desc->status & IRQ_INPROGRESS)) if (unlikely(desc->status & IRQ_INPROGRESS))
goto out_unlock; goto out_unlock;
...@@ -396,16 +396,16 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc) ...@@ -396,16 +396,16 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
goto out_unlock; goto out_unlock;
desc->status |= IRQ_INPROGRESS; desc->status |= IRQ_INPROGRESS;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
out_unlock: out_unlock:
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
/** /**
...@@ -424,7 +424,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) ...@@ -424,7 +424,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
struct irqaction *action; struct irqaction *action;
irqreturn_t action_ret; irqreturn_t action_ret;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
mask_ack_irq(desc, irq); mask_ack_irq(desc, irq);
if (unlikely(desc->status & IRQ_INPROGRESS)) if (unlikely(desc->status & IRQ_INPROGRESS))
...@@ -441,13 +441,13 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) ...@@ -441,13 +441,13 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
goto out_unlock; goto out_unlock;
desc->status |= IRQ_INPROGRESS; desc->status |= IRQ_INPROGRESS;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
if (unlikely(desc->status & IRQ_ONESHOT)) if (unlikely(desc->status & IRQ_ONESHOT))
...@@ -455,7 +455,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) ...@@ -455,7 +455,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
else if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) else if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
desc->chip->unmask(irq); desc->chip->unmask(irq);
out_unlock: out_unlock:
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
EXPORT_SYMBOL_GPL(handle_level_irq); EXPORT_SYMBOL_GPL(handle_level_irq);
...@@ -475,7 +475,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) ...@@ -475,7 +475,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
struct irqaction *action; struct irqaction *action;
irqreturn_t action_ret; irqreturn_t action_ret;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (unlikely(desc->status & IRQ_INPROGRESS)) if (unlikely(desc->status & IRQ_INPROGRESS))
goto out; goto out;
...@@ -497,18 +497,18 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) ...@@ -497,18 +497,18 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
desc->status |= IRQ_INPROGRESS; desc->status |= IRQ_INPROGRESS;
desc->status &= ~IRQ_PENDING; desc->status &= ~IRQ_PENDING;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
out: out:
desc->chip->eoi(irq); desc->chip->eoi(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
/** /**
...@@ -530,7 +530,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) ...@@ -530,7 +530,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
void void
handle_edge_irq(unsigned int irq, struct irq_desc *desc) handle_edge_irq(unsigned int irq, struct irq_desc *desc)
{ {
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~(IRQ_REPLAY | IRQ_WAITING); desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
...@@ -576,17 +576,17 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) ...@@ -576,17 +576,17 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
} }
desc->status &= ~IRQ_PENDING; desc->status &= ~IRQ_PENDING;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
} while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING); } while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
out_unlock: out_unlock:
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
} }
/** /**
...@@ -643,7 +643,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, ...@@ -643,7 +643,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
} }
chip_bus_lock(irq, desc); chip_bus_lock(irq, desc);
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
/* Uninstall? */ /* Uninstall? */
if (handle == handle_bad_irq) { if (handle == handle_bad_irq) {
...@@ -661,7 +661,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, ...@@ -661,7 +661,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
desc->depth = 0; desc->depth = 0;
desc->chip->startup(irq); desc->chip->startup(irq);
} }
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
chip_bus_sync_unlock(irq, desc); chip_bus_sync_unlock(irq, desc);
} }
EXPORT_SYMBOL_GPL(__set_irq_handler); EXPORT_SYMBOL_GPL(__set_irq_handler);
...@@ -692,9 +692,9 @@ void __init set_irq_noprobe(unsigned int irq) ...@@ -692,9 +692,9 @@ void __init set_irq_noprobe(unsigned int irq)
return; return;
} }
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->status |= IRQ_NOPROBE; desc->status |= IRQ_NOPROBE;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
void __init set_irq_probe(unsigned int irq) void __init set_irq_probe(unsigned int irq)
...@@ -707,7 +707,7 @@ void __init set_irq_probe(unsigned int irq) ...@@ -707,7 +707,7 @@ void __init set_irq_probe(unsigned int irq)
return; return;
} }
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
desc->status &= ~IRQ_NOPROBE; desc->status &= ~IRQ_NOPROBE;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
...@@ -80,7 +80,7 @@ static struct irq_desc irq_desc_init = { ...@@ -80,7 +80,7 @@ static struct irq_desc irq_desc_init = {
.chip = &no_irq_chip, .chip = &no_irq_chip,
.handle_irq = handle_bad_irq, .handle_irq = handle_bad_irq,
.depth = 1, .depth = 1,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock), .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc_init.lock),
}; };
void __ref init_kstat_irqs(struct irq_desc *desc, int node, int nr) void __ref init_kstat_irqs(struct irq_desc *desc, int node, int nr)
...@@ -108,7 +108,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node) ...@@ -108,7 +108,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)
{ {
memcpy(desc, &irq_desc_init, sizeof(struct irq_desc)); memcpy(desc, &irq_desc_init, sizeof(struct irq_desc));
spin_lock_init(&desc->lock); raw_spin_lock_init(&desc->lock);
desc->irq = irq; desc->irq = irq;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
desc->node = node; desc->node = node;
...@@ -130,7 +130,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node) ...@@ -130,7 +130,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)
/* /*
* Protect the sparse_irqs: * Protect the sparse_irqs:
*/ */
DEFINE_SPINLOCK(sparse_irq_lock); DEFINE_RAW_SPINLOCK(sparse_irq_lock);
struct irq_desc **irq_desc_ptrs __read_mostly; struct irq_desc **irq_desc_ptrs __read_mostly;
...@@ -141,7 +141,7 @@ static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_sm ...@@ -141,7 +141,7 @@ static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_sm
.chip = &no_irq_chip, .chip = &no_irq_chip,
.handle_irq = handle_bad_irq, .handle_irq = handle_bad_irq,
.depth = 1, .depth = 1,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc_init.lock), .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc_init.lock),
} }
}; };
...@@ -212,7 +212,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node) ...@@ -212,7 +212,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)
if (desc) if (desc)
return desc; return desc;
spin_lock_irqsave(&sparse_irq_lock, flags); raw_spin_lock_irqsave(&sparse_irq_lock, flags);
/* We have to check it to avoid races with another CPU */ /* We have to check it to avoid races with another CPU */
desc = irq_desc_ptrs[irq]; desc = irq_desc_ptrs[irq];
...@@ -234,7 +234,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node) ...@@ -234,7 +234,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)
irq_desc_ptrs[irq] = desc; irq_desc_ptrs[irq] = desc;
out_unlock: out_unlock:
spin_unlock_irqrestore(&sparse_irq_lock, flags); raw_spin_unlock_irqrestore(&sparse_irq_lock, flags);
return desc; return desc;
} }
...@@ -247,7 +247,7 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = { ...@@ -247,7 +247,7 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned_in_smp = {
.chip = &no_irq_chip, .chip = &no_irq_chip,
.handle_irq = handle_bad_irq, .handle_irq = handle_bad_irq,
.depth = 1, .depth = 1,
.lock = __SPIN_LOCK_UNLOCKED(irq_desc->lock), .lock = __RAW_SPIN_LOCK_UNLOCKED(irq_desc->lock),
} }
}; };
...@@ -473,7 +473,7 @@ unsigned int __do_IRQ(unsigned int irq) ...@@ -473,7 +473,7 @@ unsigned int __do_IRQ(unsigned int irq)
return 1; return 1;
} }
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (desc->chip->ack) if (desc->chip->ack)
desc->chip->ack(irq); desc->chip->ack(irq);
/* /*
...@@ -517,13 +517,13 @@ unsigned int __do_IRQ(unsigned int irq) ...@@ -517,13 +517,13 @@ unsigned int __do_IRQ(unsigned int irq)
for (;;) { for (;;) {
irqreturn_t action_ret; irqreturn_t action_ret;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
action_ret = handle_IRQ_event(irq, action); action_ret = handle_IRQ_event(irq, action);
if (!noirqdebug) if (!noirqdebug)
note_interrupt(irq, desc, action_ret); note_interrupt(irq, desc, action_ret);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
if (likely(!(desc->status & IRQ_PENDING))) if (likely(!(desc->status & IRQ_PENDING)))
break; break;
desc->status &= ~IRQ_PENDING; desc->status &= ~IRQ_PENDING;
...@@ -536,7 +536,7 @@ unsigned int __do_IRQ(unsigned int irq) ...@@ -536,7 +536,7 @@ unsigned int __do_IRQ(unsigned int irq)
* disabled while the handler was running. * disabled while the handler was running.
*/ */
desc->chip->end(irq); desc->chip->end(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
return 1; return 1;
} }
......
...@@ -18,7 +18,7 @@ extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume); ...@@ -18,7 +18,7 @@ extern void __enable_irq(struct irq_desc *desc, unsigned int irq, bool resume);
extern struct lock_class_key irq_desc_lock_class; extern struct lock_class_key irq_desc_lock_class;
extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr); extern void init_kstat_irqs(struct irq_desc *desc, int node, int nr);
extern void clear_kstat_irqs(struct irq_desc *desc); extern void clear_kstat_irqs(struct irq_desc *desc);
extern spinlock_t sparse_irq_lock; extern raw_spinlock_t sparse_irq_lock;
#ifdef CONFIG_SPARSE_IRQ #ifdef CONFIG_SPARSE_IRQ
/* irq_desc_ptrs allocated at boot time */ /* irq_desc_ptrs allocated at boot time */
......
...@@ -46,9 +46,9 @@ void synchronize_irq(unsigned int irq) ...@@ -46,9 +46,9 @@ void synchronize_irq(unsigned int irq)
cpu_relax(); cpu_relax();
/* Ok, that indicated we're done: double-check carefully. */ /* Ok, that indicated we're done: double-check carefully. */
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
status = desc->status; status = desc->status;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
/* Oops, that failed? */ /* Oops, that failed? */
} while (status & IRQ_INPROGRESS); } while (status & IRQ_INPROGRESS);
...@@ -114,7 +114,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask) ...@@ -114,7 +114,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
if (!desc->chip->set_affinity) if (!desc->chip->set_affinity)
return -EINVAL; return -EINVAL;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
#ifdef CONFIG_GENERIC_PENDING_IRQ #ifdef CONFIG_GENERIC_PENDING_IRQ
if (desc->status & IRQ_MOVE_PCNTXT) { if (desc->status & IRQ_MOVE_PCNTXT) {
...@@ -134,7 +134,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask) ...@@ -134,7 +134,7 @@ int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask)
} }
#endif #endif
desc->status |= IRQ_AFFINITY_SET; desc->status |= IRQ_AFFINITY_SET;
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return 0; return 0;
} }
...@@ -181,11 +181,11 @@ int irq_select_affinity_usr(unsigned int irq) ...@@ -181,11 +181,11 @@ int irq_select_affinity_usr(unsigned int irq)
unsigned long flags; unsigned long flags;
int ret; int ret;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
ret = setup_affinity(irq, desc); ret = setup_affinity(irq, desc);
if (!ret) if (!ret)
irq_set_thread_affinity(desc); irq_set_thread_affinity(desc);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret; return ret;
} }
...@@ -231,9 +231,9 @@ void disable_irq_nosync(unsigned int irq) ...@@ -231,9 +231,9 @@ void disable_irq_nosync(unsigned int irq)
return; return;
chip_bus_lock(irq, desc); chip_bus_lock(irq, desc);
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
__disable_irq(desc, irq, false); __disable_irq(desc, irq, false);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
chip_bus_sync_unlock(irq, desc); chip_bus_sync_unlock(irq, desc);
} }
EXPORT_SYMBOL(disable_irq_nosync); EXPORT_SYMBOL(disable_irq_nosync);
...@@ -308,9 +308,9 @@ void enable_irq(unsigned int irq) ...@@ -308,9 +308,9 @@ void enable_irq(unsigned int irq)
return; return;
chip_bus_lock(irq, desc); chip_bus_lock(irq, desc);
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
__enable_irq(desc, irq, false); __enable_irq(desc, irq, false);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
chip_bus_sync_unlock(irq, desc); chip_bus_sync_unlock(irq, desc);
} }
EXPORT_SYMBOL(enable_irq); EXPORT_SYMBOL(enable_irq);
...@@ -347,7 +347,7 @@ int set_irq_wake(unsigned int irq, unsigned int on) ...@@ -347,7 +347,7 @@ int set_irq_wake(unsigned int irq, unsigned int on)
/* wakeup-capable irqs can be shared between drivers that /* wakeup-capable irqs can be shared between drivers that
* don't need to have the same sleep mode behaviors. * don't need to have the same sleep mode behaviors.
*/ */
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
if (on) { if (on) {
if (desc->wake_depth++ == 0) { if (desc->wake_depth++ == 0) {
ret = set_irq_wake_real(irq, on); ret = set_irq_wake_real(irq, on);
...@@ -368,7 +368,7 @@ int set_irq_wake(unsigned int irq, unsigned int on) ...@@ -368,7 +368,7 @@ int set_irq_wake(unsigned int irq, unsigned int on)
} }
} }
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret; return ret;
} }
EXPORT_SYMBOL(set_irq_wake); EXPORT_SYMBOL(set_irq_wake);
...@@ -484,12 +484,12 @@ static int irq_wait_for_interrupt(struct irqaction *action) ...@@ -484,12 +484,12 @@ static int irq_wait_for_interrupt(struct irqaction *action)
static void irq_finalize_oneshot(unsigned int irq, struct irq_desc *desc) static void irq_finalize_oneshot(unsigned int irq, struct irq_desc *desc)
{ {
chip_bus_lock(irq, desc); chip_bus_lock(irq, desc);
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) { if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) {
desc->status &= ~IRQ_MASKED; desc->status &= ~IRQ_MASKED;
desc->chip->unmask(irq); desc->chip->unmask(irq);
} }
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
chip_bus_sync_unlock(irq, desc); chip_bus_sync_unlock(irq, desc);
} }
...@@ -514,9 +514,9 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action) ...@@ -514,9 +514,9 @@ irq_thread_check_affinity(struct irq_desc *desc, struct irqaction *action)
return; return;
} }
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
cpumask_copy(mask, desc->affinity); cpumask_copy(mask, desc->affinity);
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
set_cpus_allowed_ptr(current, mask); set_cpus_allowed_ptr(current, mask);
free_cpumask_var(mask); free_cpumask_var(mask);
...@@ -545,7 +545,7 @@ static int irq_thread(void *data) ...@@ -545,7 +545,7 @@ static int irq_thread(void *data)
atomic_inc(&desc->threads_active); atomic_inc(&desc->threads_active);
spin_lock_irq(&desc->lock); raw_spin_lock_irq(&desc->lock);
if (unlikely(desc->status & IRQ_DISABLED)) { if (unlikely(desc->status & IRQ_DISABLED)) {
/* /*
* CHECKME: We might need a dedicated * CHECKME: We might need a dedicated
...@@ -555,9 +555,9 @@ static int irq_thread(void *data) ...@@ -555,9 +555,9 @@ static int irq_thread(void *data)
* retriggers the interrupt itself --- tglx * retriggers the interrupt itself --- tglx
*/ */
desc->status |= IRQ_PENDING; desc->status |= IRQ_PENDING;
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
} else { } else {
spin_unlock_irq(&desc->lock); raw_spin_unlock_irq(&desc->lock);
action->thread_fn(action->irq, action->dev_id); action->thread_fn(action->irq, action->dev_id);
...@@ -679,7 +679,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ...@@ -679,7 +679,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
/* /*
* The following block of code has to be executed atomically * The following block of code has to be executed atomically
*/ */
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
old_ptr = &desc->action; old_ptr = &desc->action;
old = *old_ptr; old = *old_ptr;
if (old) { if (old) {
...@@ -775,7 +775,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ...@@ -775,7 +775,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
__enable_irq(desc, irq, false); __enable_irq(desc, irq, false);
} }
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
/* /*
* Strictly no need to wake it up, but hung_task complains * Strictly no need to wake it up, but hung_task complains
...@@ -802,7 +802,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new) ...@@ -802,7 +802,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
ret = -EBUSY; ret = -EBUSY;
out_thread: out_thread:
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
if (new->thread) { if (new->thread) {
struct task_struct *t = new->thread; struct task_struct *t = new->thread;
...@@ -844,7 +844,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id) ...@@ -844,7 +844,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
if (!desc) if (!desc)
return NULL; return NULL;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
/* /*
* There can be multiple actions per IRQ descriptor, find the right * There can be multiple actions per IRQ descriptor, find the right
...@@ -856,7 +856,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id) ...@@ -856,7 +856,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
if (!action) { if (!action) {
WARN(1, "Trying to free already-free IRQ %d\n", irq); WARN(1, "Trying to free already-free IRQ %d\n", irq);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return NULL; return NULL;
} }
...@@ -884,7 +884,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id) ...@@ -884,7 +884,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
desc->chip->disable(irq); desc->chip->disable(irq);
} }
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
unregister_handler_proc(irq, action); unregister_handler_proc(irq, action);
......
...@@ -27,7 +27,7 @@ void move_masked_irq(int irq) ...@@ -27,7 +27,7 @@ void move_masked_irq(int irq)
if (!desc->chip->set_affinity) if (!desc->chip->set_affinity)
return; return;
assert_spin_locked(&desc->lock); assert_raw_spin_locked(&desc->lock);
/* /*
* If there was a valid mask to work with, please * If there was a valid mask to work with, please
......
...@@ -42,7 +42,7 @@ static bool init_copy_one_irq_desc(int irq, struct irq_desc *old_desc, ...@@ -42,7 +42,7 @@ static bool init_copy_one_irq_desc(int irq, struct irq_desc *old_desc,
"for migration.\n", irq); "for migration.\n", irq);
return false; return false;
} }
spin_lock_init(&desc->lock); raw_spin_lock_init(&desc->lock);
desc->node = node; desc->node = node;
lockdep_set_class(&desc->lock, &irq_desc_lock_class); lockdep_set_class(&desc->lock, &irq_desc_lock_class);
init_copy_kstat_irqs(old_desc, desc, node, nr_cpu_ids); init_copy_kstat_irqs(old_desc, desc, node, nr_cpu_ids);
...@@ -67,7 +67,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, ...@@ -67,7 +67,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
irq = old_desc->irq; irq = old_desc->irq;
spin_lock_irqsave(&sparse_irq_lock, flags); raw_spin_lock_irqsave(&sparse_irq_lock, flags);
/* We have to check it to avoid races with another CPU */ /* We have to check it to avoid races with another CPU */
desc = irq_desc_ptrs[irq]; desc = irq_desc_ptrs[irq];
...@@ -91,7 +91,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, ...@@ -91,7 +91,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
} }
irq_desc_ptrs[irq] = desc; irq_desc_ptrs[irq] = desc;
spin_unlock_irqrestore(&sparse_irq_lock, flags); raw_spin_unlock_irqrestore(&sparse_irq_lock, flags);
/* free the old one */ /* free the old one */
free_one_irq_desc(old_desc, desc); free_one_irq_desc(old_desc, desc);
...@@ -100,7 +100,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, ...@@ -100,7 +100,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,
return desc; return desc;
out_unlock: out_unlock:
spin_unlock_irqrestore(&sparse_irq_lock, flags); raw_spin_unlock_irqrestore(&sparse_irq_lock, flags);
return desc; return desc;
} }
......
...@@ -28,9 +28,9 @@ void suspend_device_irqs(void) ...@@ -28,9 +28,9 @@ void suspend_device_irqs(void)
for_each_irq_desc(irq, desc) { for_each_irq_desc(irq, desc) {
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
__disable_irq(desc, irq, true); __disable_irq(desc, irq, true);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
for_each_irq_desc(irq, desc) for_each_irq_desc(irq, desc)
...@@ -56,9 +56,9 @@ void resume_device_irqs(void) ...@@ -56,9 +56,9 @@ void resume_device_irqs(void)
if (!(desc->status & IRQ_SUSPENDED)) if (!(desc->status & IRQ_SUSPENDED))
continue; continue;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
__enable_irq(desc, irq, true); __enable_irq(desc, irq, true);
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
} }
} }
EXPORT_SYMBOL_GPL(resume_device_irqs); EXPORT_SYMBOL_GPL(resume_device_irqs);
......
...@@ -179,7 +179,7 @@ static int name_unique(unsigned int irq, struct irqaction *new_action) ...@@ -179,7 +179,7 @@ static int name_unique(unsigned int irq, struct irqaction *new_action)
unsigned long flags; unsigned long flags;
int ret = 1; int ret = 1;
spin_lock_irqsave(&desc->lock, flags); raw_spin_lock_irqsave(&desc->lock, flags);
for (action = desc->action ; action; action = action->next) { for (action = desc->action ; action; action = action->next) {
if ((action != new_action) && action->name && if ((action != new_action) && action->name &&
!strcmp(new_action->name, action->name)) { !strcmp(new_action->name, action->name)) {
...@@ -187,7 +187,7 @@ static int name_unique(unsigned int irq, struct irqaction *new_action) ...@@ -187,7 +187,7 @@ static int name_unique(unsigned int irq, struct irqaction *new_action)
break; break;
} }
} }
spin_unlock_irqrestore(&desc->lock, flags); raw_spin_unlock_irqrestore(&desc->lock, flags);
return ret; return ret;
} }
......
...@@ -28,7 +28,7 @@ static int try_one_irq(int irq, struct irq_desc *desc) ...@@ -28,7 +28,7 @@ static int try_one_irq(int irq, struct irq_desc *desc)
struct irqaction *action; struct irqaction *action;
int ok = 0, work = 0; int ok = 0, work = 0;
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
/* Already running on another processor */ /* Already running on another processor */
if (desc->status & IRQ_INPROGRESS) { if (desc->status & IRQ_INPROGRESS) {
/* /*
...@@ -37,13 +37,13 @@ static int try_one_irq(int irq, struct irq_desc *desc) ...@@ -37,13 +37,13 @@ static int try_one_irq(int irq, struct irq_desc *desc)
*/ */
if (desc->action && (desc->action->flags & IRQF_SHARED)) if (desc->action && (desc->action->flags & IRQF_SHARED))
desc->status |= IRQ_PENDING; desc->status |= IRQ_PENDING;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
return ok; return ok;
} }
/* Honour the normal IRQ locking */ /* Honour the normal IRQ locking */
desc->status |= IRQ_INPROGRESS; desc->status |= IRQ_INPROGRESS;
action = desc->action; action = desc->action;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
while (action) { while (action) {
/* Only shared IRQ handlers are safe to call */ /* Only shared IRQ handlers are safe to call */
...@@ -56,7 +56,7 @@ static int try_one_irq(int irq, struct irq_desc *desc) ...@@ -56,7 +56,7 @@ static int try_one_irq(int irq, struct irq_desc *desc)
} }
local_irq_disable(); local_irq_disable();
/* Now clean up the flags */ /* Now clean up the flags */
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
action = desc->action; action = desc->action;
/* /*
...@@ -68,9 +68,9 @@ static int try_one_irq(int irq, struct irq_desc *desc) ...@@ -68,9 +68,9 @@ static int try_one_irq(int irq, struct irq_desc *desc)
* Perform real IRQ processing for the IRQ we deferred * Perform real IRQ processing for the IRQ we deferred
*/ */
work = 1; work = 1;
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
handle_IRQ_event(irq, action); handle_IRQ_event(irq, action);
spin_lock(&desc->lock); raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_PENDING; desc->status &= ~IRQ_PENDING;
} }
desc->status &= ~IRQ_INPROGRESS; desc->status &= ~IRQ_INPROGRESS;
...@@ -80,7 +80,7 @@ static int try_one_irq(int irq, struct irq_desc *desc) ...@@ -80,7 +80,7 @@ static int try_one_irq(int irq, struct irq_desc *desc)
*/ */
if (work && desc->chip && desc->chip->end) if (work && desc->chip && desc->chip->end)
desc->chip->end(irq); desc->chip->end(irq);
spin_unlock(&desc->lock); raw_spin_unlock(&desc->lock);
return ok; return ok;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment