aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/acpi
diff options
context:
space:
mode:
authorBorislav Petkov <bp@alien8.de>2010-08-28 09:58:33 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2010-10-20 17:23:55 -0400
commitb40827fa7268fda8a62490728a61c2856f33830b (patch)
treeae16ce8206c3d72ca672a92a46dc0725faba1ced /arch/x86/kernel/acpi
parentd25e6b0b326278a1096e8334584c3e64517057a3 (diff)
x86-32, mm: Add an initial page table for core bootstrapping
This patch adds an initial page table with low mappings used exclusively for booting APs/resuming after ACPI suspend/machine restart. After this, there's no need to add low mappings to swapper_pg_dir and zap them later or create own swsusp PGD page solely for ACPI sleep needs - we have initial_page_table for that. Signed-off-by: Borislav Petkov <bp@alien8.de> LKML-Reference: <20101020070526.GA9588@liondog.tnic> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/acpi')
-rw-r--r--arch/x86/kernel/acpi/sleep.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c
index 33cec152070d..b35e1ab8ba03 100644
--- a/arch/x86/kernel/acpi/sleep.c
+++ b/arch/x86/kernel/acpi/sleep.c
@@ -12,6 +12,11 @@
12#include <asm/segment.h> 12#include <asm/segment.h>
13#include <asm/desc.h> 13#include <asm/desc.h>
14 14
15#ifdef CONFIG_X86_32
16#include <asm/pgtable.h>
17#include <asm/pgtable_32.h>
18#endif
19
15#include "realmode/wakeup.h" 20#include "realmode/wakeup.h"
16#include "sleep.h" 21#include "sleep.h"
17 22
@@ -90,7 +95,7 @@ int acpi_save_state_mem(void)
90 95
91#ifndef CONFIG_64BIT 96#ifndef CONFIG_64BIT
92 header->pmode_entry = (u32)&wakeup_pmode_return; 97 header->pmode_entry = (u32)&wakeup_pmode_return;
93 header->pmode_cr3 = (u32)(swsusp_pg_dir - __PAGE_OFFSET); 98 header->pmode_cr3 = (u32)__pa(&initial_page_table);
94 saved_magic = 0x12345678; 99 saved_magic = 0x12345678;
95#else /* CONFIG_64BIT */ 100#else /* CONFIG_64BIT */
96 header->trampoline_segment = setup_trampoline() >> 4; 101 header->trampoline_segment = setup_trampoline() >> 4;