sparse irq_desc[] array: core kernel and x86 changes
[deliverable/linux.git] / arch / x86 / include / asm / irq_vectors.h
index 0005adb0f941f5f564cbad634538db8b149f0f46..bb6b69a6b12575408f8b34b0e818d4c920ff7386 100644 (file)
 #define invalid_vm86_irq(irq)  ((irq) < 3 || (irq) > 15)
 
 #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_VOYAGER)
+
+#ifndef CONFIG_SPARSE_IRQ
 # if NR_CPUS < MAX_IO_APICS
 #  define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
 # else
 #  define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
 # endif
+#else
+# if (8 * NR_CPUS) > (32 * MAX_IO_APICS)
+#  define NR_IRQS (NR_VECTORS + (8 * NR_CPUS))
+# else
+#  define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
+# endif
+#endif
 
 #elif defined(CONFIG_X86_VOYAGER)
 
This page took 0.024063 seconds and 5 git commands to generate.