aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/smpboot_32.c
diff options
context:
space:
mode:
authorGlauber Costa <gcosta@redhat.com>2008-03-03 14:13:12 -0300
committerIngo Molnar <mingo@elte.hu>2008-04-17 17:40:57 +0200
commit91718e8d13c23bfe0aa6fa6b730c5c33ee9771bf (patch)
tree6ed8d645bfdc0bdcf6b93e3ac9b618f879b3bf8b /arch/x86/kernel/smpboot_32.c
parentda522b07293756b9cb4e2c570454f95b8e79e189 (diff)
x86: unify setup_trampoline
setup_trampoline() looks very similar between architectures, and this patch unifies them. The i386 version allocates bootmem memory, while the x86_64 version uses a fixed address. In this patch, we initialize the global trampoline_base to the x86_64 version, and i386 allocation can later override it. Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot_32.c')
-rw-r--r--arch/x86/kernel/smpboot_32.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index a21f25418b3..ee826594aa0 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -73,41 +73,12 @@ EXPORT_PER_CPU_SYMBOL(x86_cpu_to_apicid);
u8 apicid_2_node[MAX_APICID];
-static unsigned char *trampoline_base;
-
static void map_cpu_to_logical_apicid(void);
/* State of each CPU. */
DEFINE_PER_CPU(int, cpu_state) = { 0 };
/*
- * Currently trivial. Write the real->protected mode
- * bootstrap into the page concerned. The caller
- * has made sure it's suitably aligned.
- */
-
-static unsigned long __cpuinit setup_trampoline(void)
-{
- memcpy(trampoline_base, trampoline_data, trampoline_end - trampoline_data);
- return virt_to_phys(trampoline_base);
-}
-
-/*
- * We are called very early to get the low memory for the
- * SMP bootup trampoline page.
- */
-void __init smp_alloc_memory(void)
-{
- trampoline_base = alloc_bootmem_low_pages(PAGE_SIZE);
- /*
- * Has to be in very low memory so we can execute
- * real-mode AP code.
- */
- if (__pa(trampoline_base) >= 0x9F000)
- BUG();
-}
-
-/*
* The bootstrap kernel entry code has set these up. Save them for
* a given CPU
*/