mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Fix x86 subarch breakage by the patch to allow more APIC irq sources
@ 2003-10-22 15:56 James Bottomley
  2003-10-22 16:31 ` Linus Torvalds
  2003-10-23  3:41 ` James Cleverdon
  0 siblings, 2 replies; 4+ messages in thread
From: James Bottomley @ 2003-10-22 15:56 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: jamesclv, Linux Kernel

The problem with this patch was that it defined a new quantity
NR_IRQ_VECTORS.  However, the definition of NR_IRQ_VECTORS is only in
mach-default/irq_vectors.h.  Every subarch which defines it's own
irq_vectors.h (that's voyager, visws and pc9800) now won't compile.

I think the best fix is the attached (although you could clean up
mach-default/irq_vectors.h with this too).

James

===== include/asm-i386/irq.h 1.9 vs edited =====
--- 1.9/include/asm-i386/irq.h	Wed Apr 23 02:49:34 2003
+++ edited/include/asm-i386/irq.h	Wed Oct 22 10:49:21 2003
@@ -15,6 +15,10 @@
 /* include comes from machine specific directory */
 #include "irq_vectors.h"
 
+#ifndef NR_IRQ_VECTORS
+#define NR_IRQ_VECTORS NR_IRQS
+#endif
+
 static __inline__ int irq_canonicalize(int irq)
 {
 	return ((irq == 2) ? 9 : irq);


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix x86 subarch breakage by the patch to allow more APIC irq sources
  2003-10-22 15:56 Fix x86 subarch breakage by the patch to allow more APIC irq sources James Bottomley
@ 2003-10-22 16:31 ` Linus Torvalds
  2003-10-22 16:59   ` James Bottomley
  2003-10-23  3:41 ` James Cleverdon
  1 sibling, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2003-10-22 16:31 UTC (permalink / raw)
  To: James Bottomley; +Cc: Andrew Morton, jamesclv, Linux Kernel


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
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix x86 subarch breakage by the patch to allow more APIC irq sources
  2003-10-22 16:31 ` Linus Torvalds
@ 2003-10-22 16:59   ` James Bottomley
  0 siblings, 0 replies; 4+ messages in thread
From: James Bottomley @ 2003-10-22 16:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, jamesclv, Linux Kernel

On Wed, 2003-10-22 at 11:31, Linus Torvalds wrote:
> 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.

That's fine by me...I was originally going to do it that way until I saw
that two other subarchs had the same problem.

James



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Fix x86 subarch breakage by the patch to allow more APIC irq sources
  2003-10-22 15:56 Fix x86 subarch breakage by the patch to allow more APIC irq sources James Bottomley
  2003-10-22 16:31 ` Linus Torvalds
@ 2003-10-23  3:41 ` James Cleverdon
  1 sibling, 0 replies; 4+ messages in thread
From: James Cleverdon @ 2003-10-23  3:41 UTC (permalink / raw)
  To: James Bottomley, Linus Torvalds, Andrew Morton; +Cc: Linux Kernel

Oops!  You're right.  Sorry, for some reason I thought all the sub-arches 
would inherit the default definition.  Obviously that wasn't the case.

And, I like Linus' solution to it.


On Wednesday 22 October 2003 8:56 am, James Bottomley wrote:
> The problem with this patch was that it defined a new quantity
> NR_IRQ_VECTORS.  However, the definition of NR_IRQ_VECTORS is only in
> mach-default/irq_vectors.h.  Every subarch which defines it's own
> irq_vectors.h (that's voyager, visws and pc9800) now won't compile.
>
> I think the best fix is the attached (although you could clean up
> mach-default/irq_vectors.h with this too).
>
> James
>
> ===== include/asm-i386/irq.h 1.9 vs edited =====
> --- 1.9/include/asm-i386/irq.h	Wed Apr 23 02:49:34 2003
> +++ edited/include/asm-i386/irq.h	Wed Oct 22 10:49:21 2003
> @@ -15,6 +15,10 @@
>  /* include comes from machine specific directory */
>  #include "irq_vectors.h"
>
> +#ifndef NR_IRQ_VECTORS
> +#define NR_IRQ_VECTORS NR_IRQS
> +#endif
> +
>  static __inline__ int irq_canonicalize(int irq)
>  {
>  	return ((irq == 2) ? 9 : irq);

-- 
James Cleverdon
IBM xSeries Linux Solutions
{jamesclv(Unix, preferred), cleverdj(Notes)} at us dot ibm dot comm

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-23  3:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-22 15:56 Fix x86 subarch breakage by the patch to allow more APIC irq sources James Bottomley
2003-10-22 16:31 ` Linus Torvalds
2003-10-22 16:59   ` James Bottomley
2003-10-23  3:41 ` James Cleverdon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome