Skip to content

Commit

Permalink
x86, apic: Slim down stack usage in early_init_lapic_mapping()
Browse files Browse the repository at this point in the history
As far as I see there is no external poking of mp_lapic_addr in
this procedure which could lead to unpredited changes and
require local storage unit for it. Lets use it plain forward.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20090826171324.GC4548@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Aug 26, 2009
1 parent ffc4383 commit d3a247b
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,20 +1562,16 @@ static int __init detect_init_APIC(void)
#ifdef CONFIG_X86_64
void __init early_init_lapic_mapping(void)
{
unsigned long phys_addr;

/*
* If no local APIC can be found then go out
* : it means there is no mpatable and MADT
*/
if (!smp_found_config)
return;

phys_addr = mp_lapic_addr;

set_fixmap_nocache(FIX_APIC_BASE, phys_addr);
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
apic_printk(APIC_VERBOSE, "mapped APIC to %16lx (%16lx)\n",
APIC_BASE, phys_addr);
APIC_BASE, mp_lapic_addr);

/*
* Fetch the APIC ID of the BSP in case we have a
Expand Down

0 comments on commit d3a247b

Please sign in to comment.