Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145635
b: refs/heads/master
c: 4401da6
h: refs/heads/master
i:
  145633: e501b51
  145631: 7565880
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed May 11, 2009
1 parent d3f5188 commit fe26ed1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 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: 61fe91e1319556f32bebfd7ed2c68ef02e2c17f7
refs/heads/master: 4401da6111ac58f94234417427d06a72c4048c74
31 changes: 21 additions & 10 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,6 @@ static int __init detect_init_APIC(void)
}

mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
boot_cpu_physical_apicid = 0;
return 0;
}
#else
Expand Down Expand Up @@ -1570,6 +1569,8 @@ void __init early_init_lapic_mapping(void)
*/
void __init init_apic_mappings(void)
{
unsigned int new_apicid;

if (x2apic_mode) {
boot_cpu_physical_apicid = read_apic_id();
return;
Expand All @@ -1586,21 +1587,31 @@ void __init init_apic_mappings(void)
} else
apic_phys = mp_lapic_addr;

set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
/* lets check if we may NOP'ify apic operations */
if (!cpu_has_apic) {
pr_info("APIC: disable apic facility\n");
apic_disable();
return;
}

/*
* acpi lapic path already maps that address in
* acpi_register_lapic_address()
*/
if (!acpi_lapic)
set_fixmap_nocache(FIX_APIC_BASE, apic_phys);

apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",
APIC_BASE, apic_phys);

/*
* Fetch the APIC ID of the BSP in case we have a
* default configuration (or the MP table is broken).
*/
if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = read_apic_id();

/* lets check if we may to NOP'ify apic operations */
if (!cpu_has_apic) {
pr_info("APIC: disable apic facility\n");
apic_disable();
new_apicid = read_apic_id();
if (boot_cpu_physical_apicid != new_apicid) {
boot_cpu_physical_apicid = new_apicid;
apic_version[new_apicid] =
GET_APIC_VERSION(apic_read(APIC_LVR));
}
}

Expand Down

0 comments on commit fe26ed1

Please sign in to comment.