summaryrefslogtreecommitdiff
path: root/arch/x86/power/hibernate.c
diff options
context:
space:
mode:
authorZhimin Gu <kookoo.gu@intel.com>2018-09-21 09:28:22 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-10-03 12:56:34 +0300
commit6bae499a0ad437efb67b7c378e6fb4abef1885a1 (patch)
treebf0ee24a15cc82dcabde12b5d9e1a3aba26e3d9c /arch/x86/power/hibernate.c
parent32aa276437f6128df63111af13e57fe8f0272af3 (diff)
downloadlinux-6bae499a0ad437efb67b7c378e6fb4abef1885a1.tar.xz
x86-32, hibernate: Switch to relocated restore code during resume on 32bit system
On 64bit system, code should be executed in a safe page during page restoring, as the page where instruction is running during resume might be scribbled and causes issues. Although on 32 bit, we only suspend resuming by same kernel that did the suspend, we'd like to remove that restriction in the future. Porting corresponding code from 64bit system: Allocate a safe page, and copy the restore code to it, then jump to the safe page to run the code. Signed-off-by: Zhimin Gu <kookoo.gu@intel.com> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Chen Yu <yu.c.chen@intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch/x86/power/hibernate.c')
-rw-r--r--arch/x86/power/hibernate.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/power/hibernate.c b/arch/x86/power/hibernate.c
index 4935b8139229..7383cb67ffd7 100644
--- a/arch/x86/power/hibernate.c
+++ b/arch/x86/power/hibernate.c
@@ -212,7 +212,6 @@ int arch_hibernation_header_restore(void *addr)
return 0;
}
-#ifdef CONFIG_X86_64
int relocate_restore_code(void)
{
pgd_t *pgd;
@@ -251,4 +250,3 @@ out:
__flush_tlb_all();
return 0;
}
-#endif