Skip to contentSkip to conversation

x86,acpi: early_init_lapic_mapping - slim down stack usage

PATCH In review Cyrill Gorcunov 1 participant 2 messages Aug 26, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86,acpi: early_init_lapic_mapping - slim down stack usage

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.

---
 arch/x86/kernel/apic/apic.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
arch/x86/kernel/apic/apic.c +2 -6
Index: linux-2.6.git/arch/x86/kernel/apic/apic.c
=====================================================================
@@ -1562,8 +1562,6 @@ no_apic:
 #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
@@ -1571,11 +1569,9 @@ void __init early_init_lapic_mapping(voi
 	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
#1 lore raw

[tip:x86/apic] x86, apic: Slim down stack usage in early_init_lapic_mapping()

Commit-ID:  d3a247bfb2c26f5b67367d58af7ad8c2efbbc6c1
Gitweb:     http://git.kernel.org/tip/d3a247bfb2c26f5b67367d58af7ad8c2efbbc6c1
Author:     Cyrill Gorcunov <[email protected]>
AuthorDate: Wed, 26 Aug 2009 21:13:24 +0400
Committer:  Ingo Molnar <[email protected]>
CommitDate: Wed, 26 Aug 2009 20:26:23 +0200

x86, apic: Slim down stack usage in early_init_lapic_mapping()

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.

LKML-Reference: <20090826171324.GC4548@lenovo>

---
 arch/x86/kernel/apic/apic.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
arch/x86/kernel/apic/apic.c +2 -6
index 3fc3a6c..159740d 100644
@@ -1562,8 +1562,6 @@ no_apic:
 #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
@@ -1571,11 +1569,9 @@ void __init early_init_lapic_mapping(void)
 	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