[PATCH 1/7] x86: 64bit support more than 256 irq v1

From: Yinghai Lu
Date: Wed Jul 30 2008 - 17:11:30 EST




Dhaval Giani got:
kernel BUG at arch/x86/kernel/io_apic_64.c:357!
invalid opcode: 0000 [1] SMP
CPU 24
...

his system (x3950) has 8 ioapic, irq > 256

caused by
commit 9b7dc567d03d74a1fbae84e88949b6a60d922d82
Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Date: Fri May 2 20:10:09 2008 +0200

x86: unify interrupt vector defines

The interrupt vector defines are copied 4 times around with minimal
differences. Move them all into asm-x86/irq_vectors.h

because 64bit allow same vector for different cpu to serve different irq

need to create that array dynamically later

Signed-off-by: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
Tested-by: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx>

---
include/asm-x86/irq_vectors.h | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Index: linux-2.6/include/asm-x86/irq_vectors.h
===================================================================
--- linux-2.6.orig/include/asm-x86/irq_vectors.h
+++ linux-2.6/include/asm-x86/irq_vectors.h
@@ -113,28 +113,26 @@

# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)

+#ifdef CONFIG_X86_64
+# define NR_IRQS (32 * NR_CPUS + 224)
+#else
# define NR_IRQS 224
-
-# if (224 >= 32 * NR_CPUS)
-# define NR_IRQ_VECTORS NR_IRQS
-# else
-# define NR_IRQ_VECTORS (32 * NR_CPUS)
-# endif
+#endif

# else /* IO_APIC || PARAVIRT */

# define NR_IRQS 16
-# define NR_IRQ_VECTORS NR_IRQS

# endif

#else /* !VISWS && !VOYAGER */

# define NR_IRQS 224
-# define NR_IRQ_VECTORS NR_IRQS

#endif /* VISWS */

+#define NR_IRQ_VECTORS NR_IRQS
+
/* Voyager specific defines */
/* These define the CPIs we use in linux */
#define VIC_CPI_LEVEL0 0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/