Re: [PATCH][RFC] Vector sharing

Jean-Francois Neyroud
2004-04-20T12:25:00Z

[-- Attachment #1: Type: text/plain, Size: 641 bytes --]

Kenji Kaneshige wrote:

>Hi,
>
>I'm trying to make a patch that allows device vectors to be shared by
>multiple interrupt sources. This patch enables ia64 linux to boot on
>the machine that has single vector number space and many device
>interrupt sources (more than 184).
>
>I
>
Hi Kenji,

An other or complementary way is to attach a vector only for interrupt
lines witch are used, PCI slots have 4 interrupt lines but only 1 or
sometime 2 are used by adapters.

Find hereafter a patch tested on IA64 platform.

Jean-Francois.

--
Jean-Francois Neyroud
Bull SA http://www-frec.bull.com

[-- Attachment #2: Bull_irq_dynamic.patch --]
[-- Type: text/plain, Size: 1098 bytes --]

--- linux-2.6.3_ref/drivers/acpi/pci_irq.c Wed Feb 18 04:57:46 2004
+++ linux-2.6.3/drivers/acpi/pci_irq.c Fri Feb 27 14:06:37 2004
@@ -264,8 +264,15 @@
}
}
else if (!entry->irq) {
- ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid static routing entry (IRQ 0)\n"));
- return_VALUE(0);
+ int irq;
+
+ irq = iosapic_register_intr(entry->link.index, IOSAPIC_POL_LOW, IOSAPIC_LEVEL);
+ if (irq < 0) {
+
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid static routing entry (IRQ 0)\n"));
+ return_VALUE(0);
+ }
+ entry->irq = irq;
}

ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", entry->irq));
--- linux-2.6.3_ref/arch/ia64/kernel/iosapic.c Fri Feb 27 13:57:06 2004
+++ linux-2.6.3/arch/ia64/kernel/iosapic.c Fri Feb 27 14:03:20 2004
@@ -706,8 +706,8 @@
if (pcat_compat && (gsi < 16))
vector = isa_irq_to_vector(gsi);
else
- /* new GSI; allocate a vector for it */
- vector = ia64_alloc_vector();
+ /* new GSI; don't allocate a vector for it */
+ continue;

register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, IOSAPIC_POL_LOW,
IOSAPIC_LEVEL);