diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-01-15 16:22:34 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-01-22 09:10:55 -0500 |
commit | 35e4c6d30e6f69745d77afd5f63203ad440bed12 (patch) | |
tree | 7ce6b3142e27fbec5599e58b9202d29e0a7247ff | |
parent | a46f5c89274245e42834dc976896444efd53ccdc (diff) |
x86/apic: Sanitize ioapic handling
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>
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 0c554f5d03a6..3b4bdd5da12e 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1905,24 +1905,13 @@ int __init APIC_init_uniprocessor(void) | |||
1905 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); | 1905 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); |
1906 | setup_local_APIC(); | 1906 | setup_local_APIC(); |
1907 | 1907 | ||
1908 | #ifdef CONFIG_X86_IO_APIC | 1908 | /* Enable IO-APICs before enabling error vector */ |
1909 | /* | 1909 | enable_IO_APIC(); |
1910 | * Now enable IO-APICs, actually call clear_IO_APIC | ||
1911 | * We need clear_IO_APIC before enabling error vector | ||
1912 | */ | ||
1913 | if (!skip_ioapic_setup && nr_ioapics) | ||
1914 | enable_IO_APIC(); | ||
1915 | #endif | ||
1916 | 1910 | ||
1917 | bsp_end_local_APIC_setup(); | 1911 | bsp_end_local_APIC_setup(); |
1918 | 1912 | ||
1919 | #ifdef CONFIG_X86_IO_APIC | 1913 | if (smp_found_config) |
1920 | if (smp_found_config && !skip_ioapic_setup && nr_ioapics) | ||
1921 | setup_IO_APIC(); | 1914 | setup_IO_APIC(); |
1922 | else { | ||
1923 | nr_ioapics = 0; | ||
1924 | } | ||
1925 | #endif | ||
1926 | 1915 | ||
1927 | x86_init.timers.setup_percpu_clockev(); | 1916 | x86_init.timers.setup_percpu_clockev(); |
1928 | return 0; | 1917 | return 0; |