efi/libstub/x86: Avoid getter function for efi_is64
We no longer need to take special care when using global variables in the EFI stub, so switch to a simple symbol reference for efi_is64. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
@@ -225,14 +225,19 @@ efi_status_t efi_set_virtual_address_map(unsigned long memory_map_size,
|
||||
|
||||
/* arch specific definitions used by the stub code */
|
||||
|
||||
__attribute_const__ bool efi_is_64bit(void);
|
||||
extern const bool efi_is64;
|
||||
|
||||
static inline bool efi_is_64bit(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_EFI_MIXED))
|
||||
return efi_is64;
|
||||
return IS_ENABLED(CONFIG_X86_64);
|
||||
}
|
||||
|
||||
static inline bool efi_is_native(void)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_X86_64))
|
||||
return true;
|
||||
if (!IS_ENABLED(CONFIG_EFI_MIXED))
|
||||
return true;
|
||||
return efi_is_64bit();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user