MSI broke voyager build
PATCH 1/1 MSI broke voyager build
Quoted 48 lines · James Bottomley
The author made the
arch/i386compile depend onNR_VECTORSbeing defined.This symbol, however, was put only into
mach-default/irq_vectors.hThe attached patch adds it to voyager; visws and pc9800 however, are still broken.
The code that breaks is this (in
arch/i386/kernel/i8259.c):(quoted diff) +3
-1* us. (some of these will be overridden and become * 'special' SMP interrupts) */ - for (i = 0; i < NR_IRQS; i++) { + for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) { int vector = FIRST_EXTERNAL_VECTOR + i; + if (i >= NR_IRQS) + break; if (vector != SYSCALL_VECTOR) set_intr_gate(vector, interrupt[i]);as far as I can see, with
NR_VECTORSset at 256,FIRST_EXTERNAL_VECTORat 32 andNR_IRQSset at 224 the two forms of the loop are identical. The only case it would make a difference would be forNR_IRQ>NR_VECTORS+FIRST_EXTERNAL_VECTORwhich doesn't seem to make any sense. Perhaps just backing this change out ofi8259.cwould be better?NR_VECTORSseems to have no other defined use in the MSI code.Quoted 4 lines
It would make a significant difference when
CONFIG_PCI_USE_VECTORis set to "Y" by users to enable MSI support. The setting ofCONFIG_PCI_USE_VECTORto "Y" setsNR_IRQSat 239 (FIRST_SYSTEM_VECTOR) instead of 224.=====
include/asm-i386/mach-voyager/irq_vectors.h1.4 vs edited =====
---1.4/include/asm-i386/mach-voyager/irq_vectors.hWed Oct 22 11:34:51
2003
+++edited/include/asm-i386/mach-voyager/irq_vectors.hWed Dec 31
16:30:15 2003(quoted diff) +1
-0@@ -55,6 +55,7 @@ #define VIC_CPU_BOOT_CPI VIC_CPI_LEVEL0 #define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8) +#define NR_VECTORS 256 #define NR_IRQS 224 #define NR_IRQ_VECTORS NR_IRQS
Quoted 1 line
Quoted 1 line
Thanks for providing a fix. The fix looks fine to me.
Thanks,
Long