From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date: Sun, 14 Aug 2016 02:07:32 +0000 (+0200)
Subject: x86/power/64: Use __pa() for physical address computation
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d87f493ddb1b86a0569fa3c4037fa9efc0c7183;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

x86/power/64: Use __pa() for physical address computation

The value of temp_level4_pgt is the physical address of the
top-level page directory, so use __pa() to compute it.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
---

diff --git a/arch/x86/power/hibernate_64.c b/arch/x86/power/hibernate_64.c
index a3e3ccc87138..9634557a5444 100644
--- a/arch/x86/power/hibernate_64.c
+++ b/arch/x86/power/hibernate_64.c
@@ -113,7 +113,7 @@ static int set_up_temporary_mappings(void)
 			return result;
 	}
 
-	temp_level4_pgt = (unsigned long)pgd - __PAGE_OFFSET;
+	temp_level4_pgt = __pa(pgd);
 	return 0;
 }