]> git.karo-electronics.de Git - karo-tx-linux.git/commit
efi: Clean up the efi_call_phys_[prolog|epilog]() save/restore interaction
authorIngo Molnar <mingo@kernel.org>
Tue, 3 Mar 2015 06:48:50 +0000 (07:48 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Wed, 1 Apr 2015 11:46:22 +0000 (12:46 +0100)
commit744937b0b12a669f298949c4a810794c59fead98
treed7d4082f50f1b56a6844012aaf5ff95690686aa1
parent23a0d4e8fa6d3a1d7fb819f79bcc0a3739c30ba9
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@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/include/asm/efi.h
arch/x86/platform/efi/efi.c
arch/x86/platform/efi/efi_32.c
arch/x86/platform/efi/efi_64.c