Commit 914bebfa authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: use disable_apic in 32bit

change the enable_local_apic to static force_enable_local_apic for 32bit
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a04ad82d
...@@ -55,9 +55,10 @@ unsigned long mp_lapic_addr; ...@@ -55,9 +55,10 @@ unsigned long mp_lapic_addr;
/* /*
* Knob to control our willingness to enable the local APIC. * Knob to control our willingness to enable the local APIC.
* *
* -1=force-disable, +1=force-enable * +1=force-enable
*/ */
int enable_local_apic; static int force_enable_local_apic;
int disable_apic;
/* Local APIC timer verification ok */ /* Local APIC timer verification ok */
static int local_apic_timer_verify_ok; static int local_apic_timer_verify_ok;
...@@ -1099,7 +1100,7 @@ static int __init detect_init_APIC(void) ...@@ -1099,7 +1100,7 @@ static int __init detect_init_APIC(void)
u32 h, l, features; u32 h, l, features;
/* Disabled by kernel option? */ /* Disabled by kernel option? */
if (enable_local_apic < 0) if (disable_apic)
return -1; return -1;
switch (boot_cpu_data.x86_vendor) { switch (boot_cpu_data.x86_vendor) {
...@@ -1122,7 +1123,7 @@ static int __init detect_init_APIC(void) ...@@ -1122,7 +1123,7 @@ static int __init detect_init_APIC(void)
* Over-ride BIOS and try to enable the local APIC only if * Over-ride BIOS and try to enable the local APIC only if
* "lapic" specified. * "lapic" specified.
*/ */
if (enable_local_apic <= 0) { if (!force_enable_local_apic) {
printk(KERN_INFO "Local APIC disabled by BIOS -- " printk(KERN_INFO "Local APIC disabled by BIOS -- "
"you can enable it with \"lapic\"\n"); "you can enable it with \"lapic\"\n");
return -1; return -1;
...@@ -1208,7 +1209,7 @@ int apic_version[MAX_APICS]; ...@@ -1208,7 +1209,7 @@ int apic_version[MAX_APICS];
int __init APIC_init_uniprocessor(void) int __init APIC_init_uniprocessor(void)
{ {
if (enable_local_apic < 0) if (disable_apic)
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
if (!smp_found_config && !cpu_has_apic) if (!smp_found_config && !cpu_has_apic)
...@@ -1682,14 +1683,14 @@ static void apic_pm_activate(void) { } ...@@ -1682,14 +1683,14 @@ static void apic_pm_activate(void) { }
*/ */
static int __init parse_lapic(char *arg) static int __init parse_lapic(char *arg)
{ {
enable_local_apic = 1; force_enable_local_apic = 1;
return 0; return 0;
} }
early_param("lapic", parse_lapic); early_param("lapic", parse_lapic);
static int __init parse_nolapic(char *arg) static int __init parse_nolapic(char *arg)
{ {
enable_local_apic = -1; disable_apic = 1;
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
return 0; return 0;
} }
......
...@@ -598,11 +598,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -598,11 +598,7 @@ void __init setup_arch(char **cmdline_p)
if (acpi_mps_check()) { if (acpi_mps_check()) {
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
#ifdef CONFIG_X86_32
enable_local_apic = -1;
#else
disable_apic = 1; disable_apic = 1;
#endif
#endif #endif
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
} }
......
...@@ -40,11 +40,7 @@ extern int local_apic_timer_c2_ok; ...@@ -40,11 +40,7 @@ extern int local_apic_timer_c2_ok;
extern int ioapic_force; extern int ioapic_force;
#ifdef CONFIG_X86_64
extern int disable_apic; extern int disable_apic;
#else
extern int enable_local_apic;
#endif
/* /*
* Basic functions accessing APICs. * Basic functions accessing APICs.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment