]> git.baikalelectronics.ru Git - kernel.git/commit
efi/libstub/x86: Use const attribute for efi_is_64bit()
authorArd Biesheuvel <ardb@kernel.org>
Mon, 13 Jan 2020 17:22:33 +0000 (18:22 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 20 Jan 2020 07:13:00 +0000 (08:13 +0100)
commit6b0e55b8b7d1a8c403fe86c7c4cce0205e2a9057
tree680ccf6ddb5f9298be52bb13f399fa4415edfbbc
parentf2c890b16ea7e9a878337669ac6b4cf33f8f856a
efi/libstub/x86: Use const attribute for efi_is_64bit()

Reshuffle the x86 stub code a bit so that we can tag the efi_is_64bit()
function with the 'const' attribute, which permits the compiler to
optimize away any redundant calls. Since we have two different entry
points for 32 and 64 bit firmware in the startup code, this also
simplifies the C code since we'll enter it with the efi_is64 variable
already set.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200113172245.27925-2-ardb@kernel.org
arch/x86/boot/compressed/eboot.c
arch/x86/boot/compressed/head_64.S
arch/x86/include/asm/efi.h