Commit 9072b37e authored by Kochi Takayoshi's avatar Kochi Takayoshi Committed by David Mosberger

[PATCH] ia64: Interrupt polarity fix

It seems that acpi_register_intr (in arch/ia64/kernel/acpi.c)
takes an interrupt polarity/trigger in opposite way.
Attached patch fixes this.  Please apply.

drivers/acpi/resource/rsirq.c decodes ACPI extended irq
resource and stores in edge_level and active_high_low members
of a structure (BTW, I think the names of these members
are source of confusion ;).

And this logic in acpi.c inverts both polarity and trigger.

vector = iosapic_register_intr(gsi,
        polarity ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
        mode ? IOSAPIC_EDGE : IOSAPIC_LEVEL);

       ACPI -> rsirq.c -> serial.c -> acpi.c            -> iosapic.c
High      0         0           0      IOSAPIC_POL_LOW
Low       1         1           1      IOSAPIC_POL_HIGH
Edge      1         0           0      IOSAPIC_LEVEL
Level     0         1           1      IOSAPIC_EDGE

As ACPI_ACTIVE_{HIGH,LOW} and ACPI_{LEVEL,EDGE}_SENSITIVE are
defined in acpi subsystem, it should be safer to use these symbols.
parent 7e3c70c0
......@@ -727,7 +727,9 @@ acpi_register_irq (u32 gsi, u32 polarity, u32 trigger)
return 0;
/* Turn it on */
vector = iosapic_register_intr (gsi, polarity, trigger);
vector = iosapic_register_intr (gsi,
(polarity == ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
(trigger == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
return vector;
}
......
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