diff options
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/irq_vectors.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index 5f7d6a1e3d28..ec87910025d5 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASM_X86_IRQ_VECTORS_H | 1 | #ifndef _ASM_X86_IRQ_VECTORS_H |
2 | #define _ASM_X86_IRQ_VECTORS_H | 2 | #define _ASM_X86_IRQ_VECTORS_H |
3 | 3 | ||
4 | #include <linux/threads.h> | ||
5 | |||
6 | /* | 4 | /* |
7 | * Linux IRQ vector layout. | 5 | * Linux IRQ vector layout. |
8 | * | 6 | * |
@@ -131,22 +129,18 @@ | |||
131 | #define NR_IRQS_LEGACY 16 | 129 | #define NR_IRQS_LEGACY 16 |
132 | 130 | ||
133 | #ifdef CONFIG_X86_IO_APIC | 131 | #ifdef CONFIG_X86_IO_APIC |
134 | 132 | # ifndef CONFIG_SPARSE_IRQ | |
135 | #include <asm/apicnum.h> /* need MAX_IO_APICS */ | 133 | # if NR_CPUS < MAX_IO_APICS |
136 | 134 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | |
137 | #ifndef CONFIG_SPARSE_IRQ | 135 | # else |
138 | # if NR_CPUS < MAX_IO_APICS | 136 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) |
139 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | 137 | # endif |
140 | # else | 138 | # else |
141 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) | 139 | # define NR_IRQS \ |
142 | # endif | ||
143 | #else | ||
144 | # define NR_IRQS \ | ||
145 | ((8 * NR_CPUS) > (32 * MAX_IO_APICS) ? \ | 140 | ((8 * NR_CPUS) > (32 * MAX_IO_APICS) ? \ |
146 | (NR_VECTORS + (8 * NR_CPUS)) : \ | 141 | (NR_VECTORS + (8 * NR_CPUS)) : \ |
147 | (NR_VECTORS + (32 * MAX_IO_APICS))) | 142 | (NR_VECTORS + (32 * MAX_IO_APICS))) |
148 | #endif | 143 | # endif |
149 | |||
150 | #else /* !CONFIG_X86_IO_APIC: */ | 144 | #else /* !CONFIG_X86_IO_APIC: */ |
151 | # define NR_IRQS 16 | 145 | # define NR_IRQS 16 |
152 | #endif | 146 | #endif |