Merge branch 'irq-fix' of git://www.modarm9.com/gitsrc/pub/people/ukleinek/linux-2.6.git
This commit is contained in:
commit
d9cadb0d2f
|
@ -62,7 +62,7 @@ static struct irq_chip ns9xxx_chip = {
|
||||||
#if 0
|
#if 0
|
||||||
#define handle_irq handle_level_irq
|
#define handle_irq handle_level_irq
|
||||||
#else
|
#else
|
||||||
void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
|
static void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
{
|
{
|
||||||
unsigned int cpu = smp_processor_id();
|
unsigned int cpu = smp_processor_id();
|
||||||
struct irqaction *action;
|
struct irqaction *action;
|
||||||
|
@ -70,27 +70,35 @@ void handle_prio_irq(unsigned int irq, struct irq_desc *desc)
|
||||||
|
|
||||||
spin_lock(&desc->lock);
|
spin_lock(&desc->lock);
|
||||||
|
|
||||||
if (unlikely(desc->status & IRQ_INPROGRESS))
|
BUG_ON(desc->status & IRQ_INPROGRESS);
|
||||||
goto out_unlock;
|
|
||||||
|
|
||||||
desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
|
desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
|
||||||
kstat_cpu(cpu).irqs[irq]++;
|
kstat_cpu(cpu).irqs[irq]++;
|
||||||
|
|
||||||
action = desc->action;
|
action = desc->action;
|
||||||
if (unlikely(!action || (desc->status & IRQ_DISABLED)))
|
if (unlikely(!action || (desc->status & IRQ_DISABLED)))
|
||||||
goto out_unlock;
|
goto out_mask;
|
||||||
|
|
||||||
desc->status |= IRQ_INPROGRESS;
|
desc->status |= IRQ_INPROGRESS;
|
||||||
spin_unlock(&desc->lock);
|
spin_unlock(&desc->lock);
|
||||||
|
|
||||||
action_ret = handle_IRQ_event(irq, action);
|
action_ret = handle_IRQ_event(irq, action);
|
||||||
|
|
||||||
|
/* XXX: There is no direct way to access noirqdebug, so check
|
||||||
|
* unconditionally for spurious irqs...
|
||||||
|
* Maybe this function should go to kernel/irq/chip.c? */
|
||||||
|
note_interrupt(irq, desc, action_ret);
|
||||||
|
|
||||||
spin_lock(&desc->lock);
|
spin_lock(&desc->lock);
|
||||||
desc->status &= ~IRQ_INPROGRESS;
|
desc->status &= ~IRQ_INPROGRESS;
|
||||||
if (!(desc->status & IRQ_DISABLED) && desc->chip->ack)
|
|
||||||
desc->chip->ack(irq);
|
|
||||||
|
|
||||||
out_unlock:
|
if (desc->status & IRQ_DISABLED)
|
||||||
|
out_mask:
|
||||||
|
desc->chip->mask(irq);
|
||||||
|
|
||||||
|
/* ack unconditionally to unmask lower prio irqs */
|
||||||
|
desc->chip->ack(irq);
|
||||||
|
|
||||||
spin_unlock(&desc->lock);
|
spin_unlock(&desc->lock);
|
||||||
}
|
}
|
||||||
#define handle_irq handle_prio_irq
|
#define handle_irq handle_prio_irq
|
||||||
|
|
Loading…
Reference in a new issue