Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234702
b: refs/heads/master
c: fa27271
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner committed Feb 19, 2011
1 parent ab7e40c commit cc28cd5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b738a50a202639614c98b5763b01bf9201779e50
refs/heads/master: fa27271bc8d230355c1f24ddea103824fdc12de6
50 changes: 19 additions & 31 deletions trunk/kernel/irq/spurious.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,48 +42,36 @@ static int try_one_irq(int irq, struct irq_desc *desc)
raw_spin_unlock(&desc->lock);
return ok;
}
/* Honour the normal IRQ locking */
desc->status |= IRQ_INPROGRESS;
action = desc->action;
raw_spin_unlock(&desc->lock);

while (action) {
/* Only shared IRQ handlers are safe to call */
if (action->flags & IRQF_SHARED) {
if (action->handler(irq, action->dev_id) ==
IRQ_HANDLED)
ok = 1;
}
action = action->next;
}
local_irq_disable();
/* Now clean up the flags */
raw_spin_lock(&desc->lock);
action = desc->action;

/*
* While we were looking for a fixup someone queued a real
* IRQ clashing with our walk:
* All handlers must agree on IRQF_SHARED, so we test just the
* first. Check for action->next as well.
*/
while ((desc->status & IRQ_PENDING) && action) {
/*
* Perform real IRQ processing for the IRQ we deferred
*/
work = 1;
action = desc->action;
if (!action || !(action->flags & IRQF_SHARED) || !action->next)
goto out;

/* Honour the normal IRQ locking */
desc->status |= IRQ_INPROGRESS;
do {
work++;
desc->status &= ~IRQ_PENDING;
raw_spin_unlock(&desc->lock);
handle_IRQ_event(irq, action);
if (handle_IRQ_event(irq, action) != IRQ_NONE)
ok = 1;
raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_PENDING;
}
action = desc->action;
} while ((desc->status & IRQ_PENDING) && action);

desc->status &= ~IRQ_INPROGRESS;
/*
* If we did actual work for the real IRQ line we must let the
* IRQ controller clean up too
*/
if (work)
if (work > 1)
irq_end(irq, desc);
raw_spin_unlock(&desc->lock);

out:
raw_spin_unlock(&desc->lock);
return ok;
}

Expand Down

0 comments on commit cc28cd5

Please sign in to comment.