From: Zhimin Gu Date: Fri, 21 Sep 2018 06:27:51 +0000 (+0800) Subject: x86-32, hibernate: Use temp_pgt as the temporary page table X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7c0a982750b3f8bc6636e8086ac4d8b7775e90f6;p=linux.git 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: Zhimin Gu Acked-by: Pavel Machek Signed-off-by: Chen Yu Acked-by: Thomas Gleixner Signed-off-by: Rafael J. Wysocki --- diff --git a/arch/x86/power/hibernate_32.c b/arch/x86/power/hibernate_32.c index f82fbd279d080..a44bdada4e4e9 100644 --- a/arch/x86/power/hibernate_32.c +++ b/arch/x86/power/hibernate_32.c @@ -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; diff --git a/arch/x86/power/hibernate_asm_32.S b/arch/x86/power/hibernate_asm_32.S index 671d38d0d9313..f0627cf30a366 100644 --- a/arch/x86/power/hibernate_asm_32.S +++ b/arch/x86/power/hibernate_asm_32.S @@ -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