* [PATCH] MSI broke voyager build
@ 2003-12-31 22:58 James Bottomley
0 siblings, 0 replies; only message in thread
From: James Bottomley @ 2003-12-31 22:58 UTC (permalink / raw)
To: Andrew Morton, Linus Torvalds, long; +Cc: Linux Kernel
The author made the arch/i386 compile depend on NR_VECTORS being
defined.
This symbol, however, was put only into mach-default/irq_vectors.h
The 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):
* 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_VECTORS set at 256, FIRST_EXTERNAL_VECTOR
at 32 and NR_IRQS set at 224 the two forms of the loop are identical.
The only case it would make a difference would be for NR_IRQ >
NR_VECTORS + FIRST_EXTERNAL_VECTOR which doesn't seem to make any
sense. Perhaps just backing this change out of i8259.c would be
better? NR_VECTORS seems to have no other defined use in the MSI code.
James
===== include/asm-i386/mach-voyager/irq_vectors.h 1.4 vs edited =====
--- 1.4/include/asm-i386/mach-voyager/irq_vectors.h Wed Oct 22 11:34:51 2003
+++ edited/include/asm-i386/mach-voyager/irq_vectors.h Wed Dec 31 16:30:15 2003
@@ -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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-31 22:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-31 22:58 [PATCH] MSI broke voyager build James Bottomley
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®