aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_32.c
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 /arch/x86/kernel/apic_32.c
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>
Diffstat (limited to 'arch/x86/kernel/apic_32.c')
-rw-r--r--arch/x86/kernel/apic_32.c15
1 files changed, 8 insertions, 7 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}