From: James Cleverdon <jamesclv@us.ibm.com>

Break out the definition of NR_IRQ_VECTORS, etc from irq_vectors.h into
irq_vectors_limits.h, so we can change it per subarch without having code
duplication for the rest of the file.  Stick the same values back for
mach-default, and override them for mach-summit/generic which needs bigger
limits.


---

 25-akpm/include/asm-i386/mach-default/irq_vectors.h        |   17 ----------
 25-akpm/include/asm-i386/mach-default/irq_vectors_limits.h |   21 +++++++++++++
 25-akpm/include/asm-i386/mach-generic/irq_vectors_limits.h |   14 ++++++++
 25-akpm/include/asm-i386/mach-summit/irq_vectors_limits.h  |   14 ++++++++
 4 files changed, 50 insertions(+), 16 deletions(-)

diff -puN include/asm-i386/mach-default/irq_vectors.h~summit-irq-count-override include/asm-i386/mach-default/irq_vectors.h
--- 25/include/asm-i386/mach-default/irq_vectors.h~summit-irq-count-override	2004-04-03 03:00:06.253280912 -0800
+++ 25-akpm/include/asm-i386/mach-default/irq_vectors.h	2004-04-03 03:00:06.257280304 -0800
@@ -84,22 +84,7 @@
  */
 #define NR_VECTORS 256
 
-#ifdef CONFIG_PCI_USE_VECTOR
-#define NR_IRQS FIRST_SYSTEM_VECTOR
-#define NR_IRQ_VECTORS NR_IRQS
-#else
-#ifdef CONFIG_X86_IO_APIC
-#define NR_IRQS 224
-# if (224 >= 32 * NR_CPUS)
-# define NR_IRQ_VECTORS NR_IRQS
-# else
-# define NR_IRQ_VECTORS (32 * NR_CPUS)
-# endif
-#else
-#define NR_IRQS 16
-#define NR_IRQ_VECTORS NR_IRQS
-#endif
-#endif
+#include "irq_vectors_limits.h"
 
 #define FPU_IRQ			13
 
diff -puN /dev/null include/asm-i386/mach-default/irq_vectors_limits.h
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ 25-akpm/include/asm-i386/mach-default/irq_vectors_limits.h	2004-04-03 03:00:06.257280304 -0800
@@ -0,0 +1,21 @@
+#ifndef _ASM_IRQ_VECTORS_LIMITS_H
+#define _ASM_IRQ_VECTORS_LIMITS_H
+
+#ifdef CONFIG_PCI_USE_VECTOR
+#define NR_IRQS FIRST_SYSTEM_VECTOR
+#define NR_IRQ_VECTORS NR_IRQS
+#else
+#ifdef CONFIG_X86_IO_APIC
+#define NR_IRQS 224
+# if (224 >= 32 * NR_CPUS)
+# define NR_IRQ_VECTORS NR_IRQS
+# else
+# define NR_IRQ_VECTORS (32 * NR_CPUS)
+# endif
+#else
+#define NR_IRQS 16
+#define NR_IRQ_VECTORS NR_IRQS
+#endif
+#endif
+
+#endif /* _ASM_IRQ_VECTORS_LIMITS_H */
diff -puN /dev/null include/asm-i386/mach-generic/irq_vectors_limits.h
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ 25-akpm/include/asm-i386/mach-generic/irq_vectors_limits.h	2004-04-03 03:00:06.257280304 -0800
@@ -0,0 +1,14 @@
+#ifndef _ASM_IRQ_VECTORS_LIMITS_H
+#define _ASM_IRQ_VECTORS_LIMITS_H
+
+/*
+ * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs,
+ * even with uni-proc kernels, so use a big array.
+ *
+ * This value should be the same in both the generic and summit subarches.
+ * Change one, change 'em both.
+ */
+#define NR_IRQS	224
+#define NR_IRQ_VECTORS	1024
+
+#endif /* _ASM_IRQ_VECTORS_LIMITS_H */
diff -puN /dev/null include/asm-i386/mach-summit/irq_vectors_limits.h
--- /dev/null	2003-09-15 06:40:47.000000000 -0700
+++ 25-akpm/include/asm-i386/mach-summit/irq_vectors_limits.h	2004-04-03 03:00:06.258280152 -0800
@@ -0,0 +1,14 @@
+#ifndef _ASM_IRQ_VECTORS_LIMITS_H
+#define _ASM_IRQ_VECTORS_LIMITS_H
+
+/*
+ * For Summit or generic (i.e. installer) kernels, we have lots of I/O APICs,
+ * even with uni-proc kernels, so use a big array.
+ *
+ * This value should be the same in both the generic and summit subarches.
+ * Change one, change 'em both.
+ */
+#define NR_IRQS	224
+#define NR_IRQ_VECTORS	1024
+
+#endif /* _ASM_IRQ_VECTORS_LIMITS_H */

_