• Rafael J. Wysocki's avatar
    x86/power/64: Do not refer to __PAGE_OFFSET from assembly code · c226fab4
    Rafael J. Wysocki authored
    When CONFIG_RANDOMIZE_MEMORY is set on x86-64, __PAGE_OFFSET becomes
    a variable and using it as a symbol in the image memory restoration
    assembly code under core_restore_code is not correct any more.
    
    To avoid that problem, modify set_up_temporary_mappings() to compute
    the physical address of the temporary page tables and store it in
    temp_level4_pgt, so that the value of that variable is ready to be
    written into CR3.  Then, the assembly code doesn't have to worry
    about converting that value into a physical address and things work
    regardless of whether or not CONFIG_RANDOMIZE_MEMORY is set.
    Reported-and-tested-by: default avatarThomas Garnier <thgarnie@google.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    c226fab4
hibernate_64.c 5.63 KB