aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-29 03:06:37 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-08 07:16:08 -0400
commit914bebfad42c417b84bda8920a3073d236007fde (patch)
tree03706ce29f8787bf069320db54f37a2e7f333308
parenta04ad82d0bff4bb564f290eb50982e02458592d9 (diff)
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>
-rw-r--r--arch/x86/kernel/apic_32.c15
-rw-r--r--arch/x86/kernel/setup.c4
-rw-r--r--include/asm-x86/apic.h4
3 files changed, 8 insertions, 15 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 8fbad8ed0ebe..6dea8306d8c0 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -55,9 +55,10 @@ unsigned long mp_lapic_addr;
55/* 55/*
56 * Knob to control our willingness to enable the local APIC. 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 */
60int enable_local_apic; 60static int force_enable_local_apic;
61int disable_apic;
61 62
62/* Local APIC timer verification ok */ 63/* Local APIC timer verification ok */
63static int local_apic_timer_verify_ok; 64static int local_apic_timer_verify_ok;
@@ -1099,7 +1100,7 @@ static int __init detect_init_APIC(void)
1099 u32 h, l, features; 1100 u32 h, l, features;
1100 1101
1101 /* Disabled by kernel option? */ 1102 /* Disabled by kernel option? */
1102 if (enable_local_apic < 0) 1103 if (disable_apic)
1103 return -1; 1104 return -1;
1104 1105
1105 switch (boot_cpu_data.x86_vendor) { 1106 switch (boot_cpu_data.x86_vendor) {
@@ -1122,7 +1123,7 @@ static int __init detect_init_APIC(void)
1122 * Over-ride BIOS and try to enable the local APIC only if 1123 * Over-ride BIOS and try to enable the local APIC only if
1123 * "lapic" specified. 1124 * "lapic" specified.
1124 */ 1125 */
1125 if (enable_local_apic <= 0) { 1126 if (!force_enable_local_apic) {
1126 printk(KERN_INFO "Local APIC disabled by BIOS -- " 1127 printk(KERN_INFO "Local APIC disabled by BIOS -- "
1127 "you can enable it with \"lapic\"\n"); 1128 "you can enable it with \"lapic\"\n");
1128 return -1; 1129 return -1;
@@ -1208,7 +1209,7 @@ int apic_version[MAX_APICS];
1208 1209
1209int __init APIC_init_uniprocessor(void) 1210int __init APIC_init_uniprocessor(void)
1210{ 1211{
1211 if (enable_local_apic < 0) 1212 if (disable_apic)
1212 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 1213 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
1213 1214
1214 if (!smp_found_config && !cpu_has_apic) 1215 if (!smp_found_config && !cpu_has_apic)
@@ -1682,14 +1683,14 @@ static void apic_pm_activate(void) { }
1682 */ 1683 */
1683static int __init parse_lapic(char *arg) 1684static int __init parse_lapic(char *arg)
1684{ 1685{
1685 enable_local_apic = 1; 1686 force_enable_local_apic = 1;
1686 return 0; 1687 return 0;
1687} 1688}
1688early_param("lapic", parse_lapic); 1689early_param("lapic", parse_lapic);
1689 1690
1690static int __init parse_nolapic(char *arg) 1691static int __init parse_nolapic(char *arg)
1691{ 1692{
1692 enable_local_apic = -1; 1693 disable_apic = 1;
1693 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 1694 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
1694 return 0; 1695 return 0;
1695} 1696}
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 4716460607b4..fb318edd8bc6 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -598,12 +598,8 @@ void __init setup_arch(char **cmdline_p)
598 598
599 if (acpi_mps_check()) { 599 if (acpi_mps_check()) {
600#ifdef CONFIG_X86_LOCAL_APIC 600#ifdef CONFIG_X86_LOCAL_APIC
601#ifdef CONFIG_X86_32
602 enable_local_apic = -1;
603#else
604 disable_apic = 1; 601 disable_apic = 1;
605#endif 602#endif
606#endif
607 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); 603 clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
608 } 604 }
609 605
diff --git a/include/asm-x86/apic.h b/include/asm-x86/apic.h
index 6ae6ae68d4cd..a29807737d3d 100644
--- a/include/asm-x86/apic.h
+++ b/include/asm-x86/apic.h
@@ -40,11 +40,7 @@ extern int local_apic_timer_c2_ok;
40 40
41extern int ioapic_force; 41extern int ioapic_force;
42 42
43#ifdef CONFIG_X86_64
44extern int disable_apic; 43extern int disable_apic;
45#else
46extern int enable_local_apic;
47#endif
48/* 44/*
49 * Basic functions accessing APICs. 45 * Basic functions accessing APICs.
50 */ 46 */