Skip to content

Commit

Permalink
x86/apic: Sanitize ioapic handling
Browse files Browse the repository at this point in the history
We have proper stubs for the IOAPIC=n case and the setup/enable
function have the required checks inside now. Remove the ifdeffery and
the copy&pasted conditionals.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>C
Acked-by: Borislav Petkov <bp@alien8.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/20150115211703.569830549@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner committed Jan 22, 2015
1 parent a46f5c8 commit 35e4c6d
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1905,24 +1905,13 @@ 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_IO_APIC
/*
* Now enable IO-APICs, actually call clear_IO_APIC
* We need clear_IO_APIC before enabling error vector
*/
if (!skip_ioapic_setup && nr_ioapics)
enable_IO_APIC();
#endif
/* Enable IO-APICs before enabling error vector */
enable_IO_APIC();

bsp_end_local_APIC_setup();

#ifdef CONFIG_X86_IO_APIC
if (smp_found_config && !skip_ioapic_setup && nr_ioapics)
if (smp_found_config)
setup_IO_APIC();
else {
nr_ioapics = 0;
}
#endif

x86_init.timers.setup_percpu_clockev();
return 0;
Expand Down

0 comments on commit 35e4c6d

Please sign in to comment.