]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix NR_IRQS when no IO apic
authorBrian Gerst <bgerst@didntduck.org>
Fri, 15 Mar 2002 07:15:55 +0000 (23:15 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 15 Mar 2002 07:15:55 +0000 (23:15 -0800)
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.

include/asm-i386/irq.h

index c0d2b88b6ff0aa35b0cc233d75ebd0abd09eb008..c1bcd739bc7bbf9245627f623cadc163ea07dd3c 100644 (file)
  * 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)
 {