Re: Fix x86 subarch breakage by the patch to allow more APIC irqsources

From: Linus Torvalds
Date: Wed Oct 22 2003 - 11:33:04 EST



On 22 Oct 2003, James Bottomley wrote:
>
> I think the best fix is the attached (although you could clean up
> mach-default/irq_vectors.h with this too).

I'd much rather do this the other way: I _detest_ "generic" values that
architectures can override, when just defining the value in the
architecture directly is smaller than the test for the generic value.

So I'd rather just see the sub-architectures add their own #defines, like
the appended.

That way there is a direct and clear causal relationship, not some kind of
"if this value doesn't exist, then we use that other value" indirection.

Linus

----
===== include/asm-i386/mach-pc9800/irq_vectors.h 1.1 vs edited =====
--- 1.1/include/asm-i386/mach-pc9800/irq_vectors.h Fri Feb 14 14:59:47 2003
+++ edited/include/asm-i386/mach-pc9800/irq_vectors.h Wed Oct 22 09:28:54 2003
@@ -18,6 +18,9 @@
* The total number of interrupt vectors (including all the
* architecture specific interrupts) needed.
*
+ * NR_IRQ_VECTORS:
+ * The total number of IO APIC vector inputs
+ *
*/
#ifndef _ASM_IRQ_VECTORS_H
#define _ASM_IRQ_VECTORS_H
@@ -81,6 +84,8 @@
#else
#define NR_IRQS 16
#endif
+
+#define NR_IRQ_VECTORS NR_IRQS

#define FPU_IRQ 8

===== include/asm-i386/mach-visws/irq_vectors.h 1.5 vs edited =====
--- 1.5/include/asm-i386/mach-visws/irq_vectors.h Thu Mar 13 17:23:56 2003
+++ edited/include/asm-i386/mach-visws/irq_vectors.h Wed Oct 22 09:28:54 2003
@@ -50,6 +50,7 @@
*
*/
#define NR_IRQS 224
+#define NR_IRQ_VECTORS NR_IRQS

#define FPU_IRQ 13

===== include/asm-i386/mach-voyager/irq_vectors.h 1.3 vs edited =====
--- 1.3/include/asm-i386/mach-voyager/irq_vectors.h Fri Feb 14 15:02:30 2003
+++ edited/include/asm-i386/mach-voyager/irq_vectors.h Wed Oct 22 09:28:54 2003
@@ -56,6 +56,7 @@
#define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8)

#define NR_IRQS 224
+#define NR_IRQ_VECTORS NR_IRQS

#define FPU_IRQ 13


-
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/