Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86: use disable_apic in 32bit

change the enable_local_apic to static force_enable_local_apic for 32bit

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Yinghai Lu and committed by
Ingo Molnar
914bebfa a04ad82d

+8 -15
+8 -7
arch/x86/kernel/apic_32.c
··· 55 55 /* 56 56 * Knob to control our willingness to enable the local APIC. 57 57 * 58 - * -1=force-disable, +1=force-enable 58 + * +1=force-enable 59 59 */ 60 - int enable_local_apic; 60 + static int force_enable_local_apic; 61 + int disable_apic; 61 62 62 63 /* Local APIC timer verification ok */ 63 64 static int local_apic_timer_verify_ok; ··· 1100 1099 u32 h, l, features; 1101 1100 1102 1101 /* Disabled by kernel option? */ 1103 - if (enable_local_apic < 0) 1102 + if (disable_apic) 1104 1103 return -1; 1105 1104 1106 1105 switch (boot_cpu_data.x86_vendor) { ··· 1123 1122 * Over-ride BIOS and try to enable the local APIC only if 1124 1123 * "lapic" specified. 1125 1124 */ 1126 - if (enable_local_apic <= 0) { 1125 + if (!force_enable_local_apic) { 1127 1126 printk(KERN_INFO "Local APIC disabled by BIOS -- " 1128 1127 "you can enable it with \"lapic\"\n"); 1129 1128 return -1; ··· 1209 1208 1210 1209 int __init APIC_init_uniprocessor(void) 1211 1210 { 1212 - if (enable_local_apic < 0) 1211 + if (disable_apic) 1213 1212 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 1214 1213 1215 1214 if (!smp_found_config && !cpu_has_apic) ··· 1683 1682 */ 1684 1683 static int __init parse_lapic(char *arg) 1685 1684 { 1686 - enable_local_apic = 1; 1685 + force_enable_local_apic = 1; 1687 1686 return 0; 1688 1687 } 1689 1688 early_param("lapic", parse_lapic); 1690 1689 1691 1690 static int __init parse_nolapic(char *arg) 1692 1691 { 1693 - enable_local_apic = -1; 1692 + disable_apic = 1; 1694 1693 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 1695 1694 return 0; 1696 1695 }
-4
arch/x86/kernel/setup.c
··· 598 598 599 599 if (acpi_mps_check()) { 600 600 #ifdef CONFIG_X86_LOCAL_APIC 601 - #ifdef CONFIG_X86_32 602 - enable_local_apic = -1; 603 - #else 604 601 disable_apic = 1; 605 - #endif 606 602 #endif 607 603 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 608 604 }
-4
include/asm-x86/apic.h
··· 40 40 41 41 extern int ioapic_force; 42 42 43 - #ifdef CONFIG_X86_64 44 43 extern int disable_apic; 45 - #else 46 - extern int enable_local_apic; 47 - #endif 48 44 /* 49 45 * Basic functions accessing APICs. 50 46 */