Commit 1b489768 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

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: default avatarYinghai <yinghai@kernel.org>
Tested-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent c78d0cf2
...@@ -101,30 +101,22 @@ ...@@ -101,30 +101,22 @@
#define LAST_VM86_IRQ 15 #define LAST_VM86_IRQ 15
#define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15)
#ifdef CONFIG_X86_64 #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_PARAVIRT) && !defined(CONFIG_X86_VISWS) && !defined(CONFIG_X86_VOYAGER)
# if NR_CPUS < MAX_IO_APICS # if NR_CPUS < MAX_IO_APICS
# define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS))
# else # else
# define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS))
# endif # endif
#elif !defined(CONFIG_X86_VOYAGER) #elif defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) || defined(CONFIG_X86_VOYAGER)
# if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS)
# define NR_IRQS 224 # define NR_IRQS 224
# else /* IO_APIC || PARAVIRT */ #else /* IO_APIC || PARAVIRT */
# define NR_IRQS 16 # define NR_IRQS 16
# endif #endif
#else /* !VISWS && !VOYAGER */
# define NR_IRQS 224
#endif /* VISWS */
/* Voyager specific defines */ /* Voyager specific defines */
/* These define the CPIs we use in linux */ /* These define the CPIs we use in linux */
......
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