Re: [PATCH] efi: Clean up the efi_call_phys_[prolog|epilog]() save/restore interaction
From: Matt Fleming
Date: Tue Mar 10 2015 - 09:36:48 EST
On Tue, 03 Mar, at 07:48:50AM, Ingo Molnar wrote:
>
> Also clean up the save_pgd global variable while at it.
>
> untested as well.
>
> Thanks,
>
> Ingo
>
> ==============>
> From 166625ceaef68fcbeee63adc63c02d75abcaf0db Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@xxxxxxxxxx>
> Date: Tue, 3 Mar 2015 07:42:48 +0100
> Subject: [PATCH] efi: Clean up the efi_call_phys_[prolog|epilog]() save/restore interaction
>
> Currently x86-64 efi_call_phys_prolog() saves into a global variable (save_pgd),
> and efi_call_phys_epilog() restores the kernel pagetables from that global
> variable.
>
> Change this to a cleaner save/restore pattern where the saving function returns
> the saved object and the restore function restores that.
>
> Apply the same concept to the 32-bit code as well.
>
> Plus this approach, as an added bonus, allows us to express the
> !efi_enabled(EFI_OLD_MEMMAP) situation in a clean fashion as well,
> via a 'NULL' return value.
>
> Cc: Tapasweni Pathak <tapaswenipathak@xxxxxxxxx>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> ---
> arch/x86/include/asm/efi.h | 6 ++++--
> arch/x86/platform/efi/efi.c | 5 +++--
> arch/x86/platform/efi/efi_32.c | 11 ++++++++---
> arch/x86/platform/efi/efi_64.c | 26 ++++++++++++++++----------
> 4 files changed, 31 insertions(+), 17 deletions(-)
Applied, thanks!
--
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/