aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/io_apic.c7
-rw-r--r--arch/x86_64/kernel/io_apic.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 893df8280756..4b8a8da4b2e0 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1256,12 +1256,15 @@ static struct irq_chip ioapic_chip;
1256static void ioapic_register_intr(int irq, int vector, unsigned long trigger) 1256static void ioapic_register_intr(int irq, int vector, unsigned long trigger)
1257{ 1257{
1258 if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || 1258 if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
1259 trigger == IOAPIC_LEVEL) 1259 trigger == IOAPIC_LEVEL) {
1260 irq_desc[irq].status |= IRQ_LEVEL;
1260 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1261 set_irq_chip_and_handler_name(irq, &ioapic_chip,
1261 handle_fasteoi_irq, "fasteoi"); 1262 handle_fasteoi_irq, "fasteoi");
1262 else 1263 } else {
1264 irq_desc[irq].status &= ~IRQ_LEVEL;
1263 set_irq_chip_and_handler_name(irq, &ioapic_chip, 1265 set_irq_chip_and_handler_name(irq, &ioapic_chip,
1264 handle_edge_irq, "edge"); 1266 handle_edge_irq, "edge");
1267 }
1265 set_intr_gate(vector, interrupt[irq]); 1268 set_intr_gate(vector, interrupt[irq]);
1266} 1269}
1267 1270
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 050141c0602b..f57f8b901912 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -800,12 +800,15 @@ static struct irq_chip ioapic_chip;
800 800
801static void ioapic_register_intr(int irq, unsigned long trigger) 801static void ioapic_register_intr(int irq, unsigned long trigger)
802{ 802{
803 if (trigger) 803 if (trigger) {
804 irq_desc[irq].status |= IRQ_LEVEL;
804 set_irq_chip_and_handler_name(irq, &ioapic_chip, 805 set_irq_chip_and_handler_name(irq, &ioapic_chip,
805 handle_fasteoi_irq, "fasteoi"); 806 handle_fasteoi_irq, "fasteoi");
806 else 807 } else {
808 irq_desc[irq].status &= ~IRQ_LEVEL;
807 set_irq_chip_and_handler_name(irq, &ioapic_chip, 809 set_irq_chip_and_handler_name(irq, &ioapic_chip,
808 handle_edge_irq, "edge"); 810 handle_edge_irq, "edge");
811 }
809} 812}
810 813
811static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq, 814static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq,