Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 63978
b: refs/heads/master
c: 738ddd3
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Aug 12, 2007
1 parent f91e831 commit 1c09e35
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 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: de0cf899bbf06b6f64a5dce9c59d74c41b6b4232
refs/heads/master: 738ddd30397c25adfa9729257623ada96ef8ce96
7 changes: 5 additions & 2 deletions trunk/arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,12 +1256,15 @@ static struct irq_chip ioapic_chip;
static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
{
if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
trigger == IOAPIC_LEVEL)
trigger == IOAPIC_LEVEL) {
irq_desc[irq].status |= IRQ_LEVEL;
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_fasteoi_irq, "fasteoi");
else
} else {
irq_desc[irq].status &= ~IRQ_LEVEL;
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_edge_irq, "edge");
}
set_intr_gate(vector, interrupt[irq]);
}

Expand Down
7 changes: 5 additions & 2 deletions trunk/arch/x86_64/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,15 @@ static struct irq_chip ioapic_chip;

static void ioapic_register_intr(int irq, unsigned long trigger)
{
if (trigger)
if (trigger) {
irq_desc[irq].status |= IRQ_LEVEL;
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_fasteoi_irq, "fasteoi");
else
} else {
irq_desc[irq].status &= ~IRQ_LEVEL;
set_irq_chip_and_handler_name(irq, &ioapic_chip,
handle_edge_irq, "edge");
}
}

static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,
Expand Down
5 changes: 1 addition & 4 deletions trunk/kernel/irq/chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,10 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
* keep it masked and get out of here
*/
action = desc->action;
if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
desc->status |= IRQ_PENDING;
if (unlikely(!action || (desc->status & IRQ_DISABLED)))
goto out_unlock;
}

desc->status |= IRQ_INPROGRESS;
desc->status &= ~IRQ_PENDING;
spin_unlock(&desc->lock);

action_ret = handle_IRQ_event(irq, action);
Expand Down
7 changes: 6 additions & 1 deletion trunk/kernel/irq/resend.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
*/
desc->chip->enable(irq);

if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
/*
* We do not resend level type interrupts. Level type
* interrupts are resent by hardware when they are still
* active.
*/
if ((status & (IRQ_LEVEL | IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;

if (!desc->chip || !desc->chip->retrigger ||
Expand Down

0 comments on commit 1c09e35

Please sign in to comment.