public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix NR_IRQS when no IO apic
@ 2002-01-28  0:27 Brian Gerst
  2002-01-28  0:42 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Gerst @ 2002-01-28  0:27 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux kernel mailing list

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

NR_IRQS should be 16 when the IO apic is not configured, as the 8259 PIC
cannot generate any more interrupts.  It also fixes a bug where the IDT
gets populated with random addresses, since only 16 entry stubs are
created.

-- 

						Brian Gerst

[-- Attachment #2: nrirqs-1 --]
[-- Type: text/plain, Size: 483 bytes --]

diff -urN linux-2.5.3-pre5/include/asm-i386/irq.h linux/include/asm-i386/irq.h
--- linux-2.5.3-pre5/include/asm-i386/irq.h	Fri Jan 25 02:25:47 2002
+++ linux/include/asm-i386/irq.h	Fri Jan 25 11:30:44 2002
@@ -23,7 +23,11 @@
  * Since vectors 0x00-0x1f are used/reserved for the CPU,
  * the usable vector space is 0x20-0xff (224 vectors)
  */
+#ifdef CONFIG_X86_IO_APIC
 #define NR_IRQS 224
+#else
+#define NR_IRQS 16
+#endif
 
 static __inline__ int irq_cannonicalize(int irq)
 {


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

* Re: [PATCH] Fix NR_IRQS when no IO apic
  2002-01-28  0:27 [PATCH] Fix NR_IRQS when no IO apic Brian Gerst
@ 2002-01-28  0:42 ` Jeff Garzik
  2002-01-28  0:51   ` Brian Gerst
  2002-01-28  1:07   ` Robert Love
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Garzik @ 2002-01-28  0:42 UTC (permalink / raw)
  To: Brian Gerst; +Cc: Linus Torvalds, Linux kernel mailing list

Brian Gerst wrote:
> 
> NR_IRQS should be 16 when the IO apic is not configured, as the 8259 PIC
> cannot generate any more interrupts.  It also fixes a bug where the IDT
> gets populated with random addresses, since only 16 entry stubs are
> created.

> +#ifdef CONFIG_X86_IO_APIC
>  #define NR_IRQS 224
> +#else
> +#define NR_IRQS 16
> +#endif

What about when ioapic is configured but not present?

	Jeff



-- 
Jeff Garzik      | "I went through my candy like hot oatmeal
Building 1024    |  through an internally-buttered weasel."
MandrakeSoft     |             - goats.com

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

* Re: [PATCH] Fix NR_IRQS when no IO apic
  2002-01-28  0:42 ` Jeff Garzik
@ 2002-01-28  0:51   ` Brian Gerst
  2002-01-28  1:07   ` Robert Love
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Gerst @ 2002-01-28  0:51 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Linus Torvalds, Linux kernel mailing list

Jeff Garzik wrote:
> 
> Brian Gerst wrote:
> >
> > NR_IRQS should be 16 when the IO apic is not configured, as the 8259 PIC
> > cannot generate any more interrupts.  It also fixes a bug where the IDT
> > gets populated with random addresses, since only 16 entry stubs are
> > created.
> 
> > +#ifdef CONFIG_X86_IO_APIC
> >  #define NR_IRQS 224
> > +#else
> > +#define NR_IRQS 16
> > +#endif
> 
> What about when ioapic is configured but not present?

No problem, just wasted memory.  With CONFIG_X86_IO_APIC, all 224 entry
stubs are created.  See arch/i386/kernel/i8259.c

-- 

						Brian Gerst

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

* Re: [PATCH] Fix NR_IRQS when no IO apic
  2002-01-28  0:42 ` Jeff Garzik
  2002-01-28  0:51   ` Brian Gerst
@ 2002-01-28  1:07   ` Robert Love
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Love @ 2002-01-28  1:07 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Brian Gerst, Linus Torvalds, Linux kernel mailing list

On Sun, 2002-01-27 at 19:42, Jeff Garzik wrote:

> What about when ioapic is configured but not present?

Then we are back where we started?  Which, unless I am missing
something, is just a waste of memory?

I see this as a no-change if CONFIG_X86_IO_APIC is set, but a proper
setting of NR_IRQS (which doesn't hurt anything but make our
arrays/loops/etc off if not set) for the case of non-IOAPIC.

	Robert Love


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

end of thread, other threads:[~2002-01-28  1:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-28  0:27 [PATCH] Fix NR_IRQS when no IO apic Brian Gerst
2002-01-28  0:42 ` Jeff Garzik
2002-01-28  0:51   ` Brian Gerst
2002-01-28  1:07   ` Robert Love

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