diff options
author | Natalie.Protasevich@unisys.com <Natalie.Protasevich@unisys.com> | 2005-07-30 14:25:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-30 16:37:50 -0400 |
commit | 6a1caa21d66bcb9ba9892435a0a54fc32cd9eeab (patch) | |
tree | 9e01b08b8aa2e40a80435570f3dab799f7909a35 /arch | |
parent | c70f5d6610c601ea2ae4ae4e49f66c80801e895f (diff) |
[PATCH] x86_64: avoid wasting IRQs patch update
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>
Acked-by: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86_64/kernel/mpparse.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index 08abf9f5b159..79c362d03e2e 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -970,8 +970,21 @@ int mp_register_gsi(u32 gsi, int edge_level, int active_high_low) | |||
970 | * due to unused I/O APIC pins. | 970 | * due to unused I/O APIC pins. |
971 | */ | 971 | */ |
972 | int irq = gsi; | 972 | int irq = gsi; |
973 | gsi = pci_irq++; | 973 | if (gsi < MAX_GSI_NUM) { |
974 | gsi_to_irq[irq] = gsi; | 974 | if (gsi > 15) |
975 | gsi = pci_irq++; | ||
976 | #ifdef CONFIG_ACPI_BUS | ||
977 | /* | ||
978 | * Don't assign IRQ used by ACPI SCI | ||
979 | */ | ||
980 | if (gsi == acpi_fadt.sci_int) | ||
981 | gsi = pci_irq++; | ||
982 | #endif | ||
983 | gsi_to_irq[irq] = gsi; | ||
984 | } else { | ||
985 | printk(KERN_ERR "GSI %u is too high\n", gsi); | ||
986 | return gsi; | ||
987 | } | ||
975 | } | 988 | } |
976 | 989 | ||
977 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, | 990 | io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, |