summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/head64.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2008-12-08 00:50:22 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-08 13:49:45 +0100
commit3e1e9002aa8b32bd4c95ac6c8fad376b7a8127fb (patch)
treef9cee272743423033e78d283955aa7c493691a2d /arch/x86/kernel/head64.c
parentFix a race condition in FASYNC handling (diff)
downloadlinux-3e1e9002aa8b32bd4c95ac6c8fad376b7a8127fb.tar.xz
linux-3e1e9002aa8b32bd4c95ac6c8fad376b7a8127fb.zip
x86: change static allocation of trampoline area
Impact: fix trampoline sizing bug, save space While debugging a suspend-to-RAM related issue it occured to me that if the trampoline code had grown past 4 KB, we would have been allocating too little memory for it, since the 4 KB size of the trampoline is hardcoded into arch/x86/kernel/e820.c . Change that by making the kernel compute the trampoline size and allocate as much memory as necessary. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r--arch/x86/kernel/head64.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index d16084f90649..388e05a5fc17 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -24,6 +24,7 @@
#include <asm/kdebug.h>
#include <asm/e820.h>
#include <asm/bios_ebda.h>
+#include <asm/trampoline.h>
/* boot cpu pda */
static struct x8664_pda _boot_cpu_pda __read_mostly;
@@ -120,6 +121,8 @@ void __init x86_64_start_reservations(char *real_mode_data)
{
copy_bootdata(__va(real_mode_data));
+ reserve_trampoline_memory();
+
reserve_early(__pa_symbol(&_text), __pa_symbol(&_end), "TEXT DATA BSS");
#ifdef CONFIG_BLK_DEV_INITRD