Skip to content

Commit

Permalink
x86: apic: Fixmap apic address even if apic disabled
Browse files Browse the repository at this point in the history
In case if apic were disabled by boot option
we still need read_apic operation. So fixmap
a fake apic area if needed.

[ Impact: fix boot crash ]

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: yinghai@kernel.org
Cc: eswierk@aristanetworks.com
LKML-Reference: <20090511134140.GH4624@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed May 11, 2009
1 parent 97a5271 commit cec6be6
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,13 +1587,6 @@ void __init init_apic_mappings(void)
} else
apic_phys = mp_lapic_addr;

/* 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()
Expand All @@ -1602,7 +1595,15 @@ void __init init_apic_mappings(void)
set_fixmap_nocache(FIX_APIC_BASE, apic_phys);

apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",
APIC_BASE, apic_phys);
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;
}

/*
* Fetch the APIC ID of the BSP in case we have a
* default configuration (or the MP table is broken).
Expand Down

0 comments on commit cec6be6

Please sign in to comment.