Commit 7c0a9827 authored by Zhimin Gu's avatar Zhimin Gu Committed by Rafael J. Wysocki

x86-32, hibernate: Use temp_pgt as the temporary page table

This is to reuse the temp_pgt for both 32bit and 64bit
system.

No intentional behavior change.
Signed-off-by: default avatarZhimin Gu <kookoo.gu@intel.com>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarChen Yu <yu.c.chen@intel.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 72adf477
......@@ -156,6 +156,8 @@ asmlinkage int swsusp_arch_resume(void)
if (error)
return error;
temp_pgt = __pa(resume_pg_dir);
/* We have got enough memory and from now on we cannot recover */
restore_image();
return 0;
......
......@@ -33,8 +33,7 @@ ENDPROC(swsusp_arch_suspend)
ENTRY(restore_image)
movl mmu_cr4_features, %ecx
movl resume_pg_dir, %eax
subl $__PAGE_OFFSET, %eax
movl temp_pgt, %eax
movl %eax, %cr3
jecxz 1f # cr4 Pentium and higher, skip if zero
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment