diff options
author | Zhimin Gu <kookoo.gu@intel.com> | 2018-09-21 08:28:32 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-10-03 11:56:34 +0200 |
commit | 5331d2c7efbccab436aa11639d7fa00a1d58abe2 (patch) | |
tree | bdfbb771fe84707394cf5c91d3015bf59c4dc786 /arch/x86/power/hibernate.c | |
parent | x86-32, hibernate: Switch to relocated restore code during resume on 32bit sy... (diff) | |
download | linux-5331d2c7efbccab436aa11639d7fa00a1d58abe2.tar.xz linux-5331d2c7efbccab436aa11639d7fa00a1d58abe2.zip |
x86-32, hibernate: Set up temporary text mapping for 32bit system
Set up the temporary text mapping for the final jump address
so that the system could jump to the right address after all
the pages have been copied back to their original address -
otherwise the final mapping for the jump address is invalid.
Analogous changes were made for 64-bit in commit 65c0554b73c9
(x86/power/64: Fix kernel text mapping corruption during image
restoration).
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.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/x86/power/hibernate.c b/arch/x86/power/hibernate.c index 7383cb67ffd7..bcddf09b5aa3 100644 --- a/arch/x86/power/hibernate.c +++ b/arch/x86/power/hibernate.c @@ -157,10 +157,8 @@ int arch_hibernation_header_save(void *addr, unsigned int max_size) if (max_size < sizeof(struct restore_data_record)) return -EOVERFLOW; rdr->magic = RESTORE_MAGIC; -#ifdef CONFIG_X86_64 rdr->jump_address = (unsigned long)restore_registers; rdr->jump_address_phys = __pa_symbol(restore_registers); -#endif /* * The restore code fixes up CR3 and CR4 in the following sequence: @@ -198,10 +196,8 @@ int arch_hibernation_header_restore(void *addr) return -EINVAL; } -#ifdef CONFIG_X86_64 restore_jump_address = rdr->jump_address; jump_address_phys = rdr->jump_address_phys; -#endif restore_cr3 = rdr->cr3; if (hibernation_e820_mismatch(rdr->e820_digest)) { |