x86: probe nr_irqs even only mptable is used

for !CONFIG_HAVE_SPARSE_IRQ

fix:

 In file included from arch/x86/kernel/early-quirks.c:18:
 include/asm/io_apic.h: In function 'probe_nr_irqs':
 include/asm/io_apic.h:209: error: 'NR_IRQS' undeclared (first use in this function)
 include/asm/io_apic.h:209: error: (Each undeclared identifier is reported only once
 include/asm/io_apic.h:209: error: for each function it appears in.)

v2: fix by Ingo

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Yinghai Lu
2008-08-19 20:50:52 -07:00
committed by Ingo Molnar
parent 8f09cd20a2
commit 9d6a4d0823
5 changed files with 41 additions and 42 deletions

View File

@@ -1069,15 +1069,15 @@ void __init setup_arch(char **cmdline_p)
prefill_possible_map();
#ifdef CONFIG_X86_64
/* need to wait for nr_cpu_ids settle down */
if (nr_irqs == NR_IRQS)
nr_irqs = 32 * nr_cpu_ids + 224;
init_cpu_to_node();
#endif
init_apic_mappings();
ioapic_init_mappings();
/* need to wait for io_apic is mapped */
nr_irqs = probe_nr_irqs();
kvm_guest_init();
e820_reserve_resources();