Commit be5fc736 authored by Brian Gerst's avatar Brian Gerst Committed by Linus Torvalds

[PATCH] Fix NR_IRQS when no IO apic

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. 
parent a0816e18
...@@ -23,7 +23,11 @@ ...@@ -23,7 +23,11 @@
* Since vectors 0x00-0x1f are used/reserved for the CPU, * Since vectors 0x00-0x1f are used/reserved for the CPU,
* the usable vector space is 0x20-0xff (224 vectors) * the usable vector space is 0x20-0xff (224 vectors)
*/ */
#ifdef CONFIG_X86_IO_APIC
#define NR_IRQS 224 #define NR_IRQS 224
#else
#define NR_IRQS 16
#endif
static __inline__ int irq_cannonicalize(int irq) static __inline__ int irq_cannonicalize(int irq)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment