diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-11-04 17:10:13 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-06 01:23:22 -0500 |
commit | 1b4897688011cd05e07f00dcfe6af3331eb36a3c (patch) | |
tree | 40c390504a3c64dd08d7df7b3fe9f6e1659e9626 /arch/x86/include/asm | |
parent | c78d0cf2925bffae8a6f00e7d9b8e971b0392edd (diff) |
x86: size NR_IRQS on 32-bit systems the same way as 64-bit
Impact: make NR_IRQS big enough for system with lots of apic/pins
If lots of IO_APIC's are there (or can be there), size the same way
as 64-bit, depending on MAX_IO_APICS and NR_CPUS.
This fixes the boot problem reported by Ben Hutchings on a 32-bit
server with 5 IO-APICs and 240 IO-APIC pins.
Signed-off-by: Yinghai <yinghai@kernel.org>
Tested-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/irq_vectors.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index d843ed0e9b2e..503aadc4ad35 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
@@ -101,30 +101,22 @@ | |||
101 | #define LAST_VM86_IRQ 15 | 101 | #define LAST_VM86_IRQ 15 |
102 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) | 102 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) |
103 | 103 | ||
104 | #ifdef CONFIG_X86_64 | 104 | #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_PARAVIRT) && !defined(CONFIG_X86_VISWS) && !defined(CONFIG_X86_VOYAGER) |
105 | # if NR_CPUS < MAX_IO_APICS | 105 | # if NR_CPUS < MAX_IO_APICS |
106 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | 106 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) |
107 | # else | 107 | # else |
108 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) | 108 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) |
109 | # endif | 109 | # endif |
110 | 110 | ||
111 | #elif !defined(CONFIG_X86_VOYAGER) | 111 | #elif defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) || defined(CONFIG_X86_VOYAGER) |
112 | 112 | ||
113 | # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) | 113 | # define NR_IRQS 224 |
114 | |||
115 | # define NR_IRQS 224 | ||
116 | |||
117 | # else /* IO_APIC || PARAVIRT */ | ||
118 | |||
119 | # define NR_IRQS 16 | ||
120 | |||
121 | # endif | ||
122 | 114 | ||
123 | #else /* !VISWS && !VOYAGER */ | 115 | #else /* IO_APIC || PARAVIRT */ |
124 | 116 | ||
125 | # define NR_IRQS 224 | 117 | # define NR_IRQS 16 |
126 | 118 | ||
127 | #endif /* VISWS */ | 119 | #endif |
128 | 120 | ||
129 | /* Voyager specific defines */ | 121 | /* Voyager specific defines */ |
130 | /* These define the CPIs we use in linux */ | 122 | /* These define the CPIs we use in linux */ |