Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99979
b: refs/heads/master
c: 914bebf
h: refs/heads/master
i:
  99977: bdff08a
  99975: a622fb9
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent fc60e02 commit 07023df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a04ad82d0bff4bb564f290eb50982e02458592d9
refs/heads/master: 914bebfad42c417b84bda8920a3073d236007fde
15 changes: 8 additions & 7 deletions trunk/arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ unsigned long mp_lapic_addr;
/*
* 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 */
static int local_apic_timer_verify_ok;
Expand Down Expand Up @@ -1099,7 +1100,7 @@ static int __init detect_init_APIC(void)
u32 h, l, features;

/* Disabled by kernel option? */
if (enable_local_apic < 0)
if (disable_apic)
return -1;

switch (boot_cpu_data.x86_vendor) {
Expand All @@ -1122,7 +1123,7 @@ static int __init detect_init_APIC(void)
* Over-ride BIOS and try to enable the local APIC only if
* "lapic" specified.
*/
if (enable_local_apic <= 0) {
if (!force_enable_local_apic) {
printk(KERN_INFO "Local APIC disabled by BIOS -- "
"you can enable it with \"lapic\"\n");
return -1;
Expand Down Expand Up @@ -1208,7 +1209,7 @@ int apic_version[MAX_APICS];

int __init APIC_init_uniprocessor(void)
{
if (enable_local_apic < 0)
if (disable_apic)
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);

if (!smp_found_config && !cpu_has_apic)
Expand Down Expand Up @@ -1682,14 +1683,14 @@ static void apic_pm_activate(void) { }
*/
static int __init parse_lapic(char *arg)
{
enable_local_apic = 1;
force_enable_local_apic = 1;
return 0;
}
early_param("lapic", parse_lapic);

static int __init parse_nolapic(char *arg)
{
enable_local_apic = -1;
disable_apic = 1;
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
return 0;
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,7 @@ void __init setup_arch(char **cmdline_p)

if (acpi_mps_check()) {
#ifdef CONFIG_X86_LOCAL_APIC
#ifdef CONFIG_X86_32
enable_local_apic = -1;
#else
disable_apic = 1;
#endif
#endif
clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC);
}
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/asm-x86/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ extern int local_apic_timer_c2_ok;

extern int ioapic_force;

#ifdef CONFIG_X86_64
extern int disable_apic;
#else
extern int enable_local_apic;
#endif
/*
* Basic functions accessing APICs.
*/
Expand Down

0 comments on commit 07023df

Please sign in to comment.