From: Krzysztof Oledzki Date: Wed, 17 Oct 2007 06:31:08 +0000 (-0700) Subject: Fix very high interrupt rate for IRQ8 (rtc) unless pnpacpi=off X-Git-Tag: v2.6.24-rc1~536 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9cd8047b463f213c294f756119ac353312e7a152;p=linux-2.6-omap-h63xx.git Fix very high interrupt rate for IRQ8 (rtc) unless pnpacpi=off Workaround for broken systems with BIOS that makes RTC interrupt level triggered and/or active low. See http://bugzilla.kernel.org/show_bug.cgi?id=5243 Based on the patch from Shaohua Li Signed-off-by: Krzysztof Piotr Oledzki Cc: "Li, Shaohua" Cc: Bjorn Helgaas Cc: Andi Kleen Cc: Adam Belay Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 0e3b8d0ff06..cd0a204d96d 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c @@ -85,6 +85,16 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, if (i >= PNP_MAX_IRQ) return; +#ifdef CONFIG_X86 + if (gsi < 16 && (triggering != ACPI_EDGE_SENSITIVE || + polarity != ACPI_ACTIVE_HIGH)) { + pnp_warn("BIOS BUG: legacy PNP IRQ %d should be edge trigger, " + "active high", gsi); + triggering = ACPI_EDGE_SENSITIVE; + polarity = ACPI_ACTIVE_HIGH; + } +#endif + res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag res->irq_resource[i].flags |= irq_flags(triggering, polarity); irq = acpi_register_gsi(gsi, triggering, polarity);