From: Takayoshi Kochi <kochi@hpc.bs1.fc.nec.co.jp>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] 2.4.21 Interrupt polarity fix
Date: Thu, 31 Jul 2003 04:53:00 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105962723421294@msgid-missing> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 1093 bytes --]
Hi Bjorn,
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.
---
1st Computer Software Division, NEC Corporation
Takayoshi Kochi <kochi@hpc.bs1.fc.nec.co.jp/t-kochi@bq.jp.nec.com>
[-- Attachment #2: acpi-int-pol.patch --]
[-- Type: Text/Plain, Size: 525 bytes --]
--- linux-2.4.21.orig/arch/ia64/kernel/acpi.c Thu Jul 31 13:14:21 2003
+++ linux-2.4.21/arch/ia64/kernel/acpi.c Thu Jul 31 13:42:36 2003
@@ -643,8 +643,9 @@
return 0;
/* Turn it on */
- vector = iosapic_register_intr(gsi, polarity ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
- mode ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
+ vector = iosapic_register_intr(gsi,
+ (polarity == ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
+ (mode == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
return vector;
}
next reply other threads:[~2003-07-31 4:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-31 4:53 Takayoshi Kochi [this message]
2003-08-05 22:16 ` [PATCH] 2.4.21 Interrupt polarity fix Bjorn Helgaas
2003-08-06 1:22 ` Takayoshi Kochi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105962723421294@msgid-missing \
--to=kochi@hpc.bs1.fc.nec.co.jp \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.