Skip to content

Commit

Permalink
x86: make 32bit to call enable_IO_APIC early like 64bit
Browse files Browse the repository at this point in the history
Impact: cleanup

So we remove some #ifdefs.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Feb 15, 2009
1 parent b69bc39 commit 88d0f55
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
8 changes: 4 additions & 4 deletions arch/x86/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1646,19 +1646,19 @@ int __init APIC_init_uniprocessor(void)
physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map);
setup_local_APIC();

#ifdef CONFIG_X86_64
#ifdef CONFIG_X86_IO_APIC
/*
* Now enable IO-APICs, actually call clear_IO_APIC
* We need clear_IO_APIC before enabling vector on BP
*/
if (!skip_ioapic_setup && nr_ioapics)
enable_IO_APIC();
#endif

#ifdef CONFIG_X86_IO_APIC
if (!smp_found_config || skip_ioapic_setup || !nr_ioapics)
#endif
localise_nmi_watchdog();
#else
localise_nmi_watchdog();
#endif
end_local_APIC_setup();

#ifdef CONFIG_X86_IO_APIC
Expand Down
4 changes: 0 additions & 4 deletions arch/x86/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -3057,13 +3057,9 @@ static inline void __init check_timer(void)
void __init setup_IO_APIC(void)
{

#ifdef CONFIG_X86_32
enable_IO_APIC();
#else
/*
* calling enable_IO_APIC() is moved to setup_local_APIC for BP
*/
#endif

io_apic_irqs = ~PIC_IRQS;

Expand Down
3 changes: 1 addition & 2 deletions arch/x86/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -1154,13 +1154,12 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
*/
setup_local_APIC();

#ifdef CONFIG_X86_64
/*
* Enable IO APIC before setting up error vector
*/
if (!skip_ioapic_setup && nr_ioapics)
enable_IO_APIC();
#endif

end_local_APIC_setup();

map_cpu_to_logical_apicid();
Expand Down

0 comments on commit 88d0f55

Please sign in to comment.