Skip to contentSkip to conversation

Avoid wasting IRQs patch update (i386)

PATCH New [email protected] 1 participant 1 message Jul 11, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Avoid wasting IRQs patch update (i386)

The patch addresses a problem with ACPI SCI interrupt entry, which gets re-used, and the IRQ is assigned to another unrelated device. The patch corrects the code such that SCI IRQ is skipped and duplicate entry is avoided.
Second issue came up with VIA chipset, the problem was caused by original patch assigning IRQs starting 16 and up. 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 <[email protected]>

---

arch/i386/kernel/mpparse.c renamed from arch/i386/kernel/mpparse.c~irq-pack-i386-update +9 -1
diff -puN arch/i386/kernel/mpparse.c~irq-pack-i386-update arch/i386/kernel/mpparse.c
@@ -1116,7 +1116,15 @@ int mp_register_gsi (u32 gsi, int edge_l
 		 */
 		int irq = gsi;
 		if (gsi < MAX_GSI_NUM) {
-			gsi = pci_irq++;
+			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);

_