From: Natalie.Protasevich@unisys.com
To: akpm@osdl.org
Cc: ak@suse.de, zwane@arm.linux.org.uk, len.brown@intel.com,
bjorn.helgaas@hp.com, shaohua.li@intel.com,
linux-kernel@vger.kernel.org, Natalie.Protasevich@unisys.com
Subject: [patch 2/2] Avoid wasting IRQs patch update (x86_64)
Date: Sun, 10 Jul 2005 04:00:32 -0700 [thread overview]
Message-ID: <20050710110032.B7BFF5796B@linux.site> (raw)
The patch adds boundary check for the MAX_GSI_NUM.
Same as the update for i386, the patch addresses a problem with ACPI SCI IRQ.
The patch corrects the code such that SCI IRQ is skipped and duplicate entry is avoided.
The VIA chipset uses 4-bit IRQ register for internal interrupt routing, and therefore
cannot handle IRQ numbers assigned to its devices. The patch corrects this problem
by allowing PCI IRQs below 16.
Signed-off by: Natalie Protasevich <Natalie.Protasevich@unisys.com>
---
diff -puN arch/x86_64/kernel/mpparse.c~irq-pack-x86_64-update arch/x86_64/kernel/mpparse.c
--- linux-2.6.13-rc2/arch/x86_64/kernel/mpparse.c~irq-pack-x86_64-update 2005-07-10 01:36:23.628899784 -0700
+++ linux-2.6.13-rc2-root/arch/x86_64/kernel/mpparse.c 2005-07-10 01:36:23.641897808 -0700
@@ -965,8 +965,21 @@ int mp_register_gsi(u32 gsi, int edge_le
* due to unused I/O APIC pins.
*/
int irq = gsi;
- gsi = pci_irq++;
- gsi_to_irq[irq] = gsi;
+ if (gsi < MAX_GSI_NUM) {
+ if (gsi > 15)
+ gsi = pci_irq++;
+#ifdef CONFIG_ACPI_BUS
+ /*
+ * Don't assign IRQ used by ACPI SCI
+ */
+ if (gsi == acpi_fadt.sci_int)
+ gsi = pci_irq++;
+#endif
+ gsi_to_irq[irq] = gsi;
+ } else {
+ printk(KERN_ERR "GSI %u is too high\n", gsi);
+ return gsi;
+ }
}
io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
_
reply other threads:[~2005-07-11 6:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20050710110032.B7BFF5796B@linux.site \
--to=natalie.protasevich@unisys.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shaohua.li@intel.com \
--cc=zwane@arm.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®