Re: [PATCH] x86/power/64: Use __pa() for physical address computation

From: Ingo Molnar
Date: Mon Aug 15 2016 - 01:10:50 EST



* Rafael J. Wysocki <rjw@xxxxxxxxxxxxx> wrote:

> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> 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@xxxxxxxxx>
> ---
> arch/x86/power/hibernate_64.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-pm/arch/x86/power/hibernate_64.c
> ===================================================================
> --- linux-pm.orig/arch/x86/power/hibernate_64.c
> +++ linux-pm/arch/x86/power/hibernate_64.c
> @@ -113,7 +113,7 @@ static int set_up_temporary_mappings(voi
> return result;
> }
>
> - temp_level4_pgt = (unsigned long)pgd - __PAGE_OFFSET;
> + temp_level4_pgt = __pa(pgd);
> return 0;
> }

Acked-by: Ingo Molnar <mingo@xxxxxxxxxx>

Thanks,

Ingo