diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-11-30 13:28:19 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-12-09 16:57:23 +0000 |
commit | f7d924894265794f447ea799dd853400749b5a22 (patch) | |
tree | e15ce9a1d56a77e81fa409bd98e4a9e4610f64e3 /drivers/firmware/efi/arm-init.c | |
parent | e5bc22a42e4d46cc203fdfb6d2c76202b08666a0 (diff) |
arm64/efi: refactor EFI init and runtime code for reuse by 32-bit ARM
This refactors the EFI init and runtime code that will be shared
between arm64 and ARM so that it can be built for both archs.
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/firmware/efi/arm-init.c')
-rw-r--r-- | drivers/firmware/efi/arm-init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index ffdd76a51929..9e15d571b53c 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -57,7 +57,7 @@ static int __init uefi_init(void) { efi_char16_t *c16; void *config_tables; - u64 table_size; + size_t table_size; char vendor[100] = "unknown"; int i, retval; @@ -69,7 +69,8 @@ static int __init uefi_init(void) } set_bit(EFI_BOOT, &efi.flags); - set_bit(EFI_64BIT, &efi.flags); + if (IS_ENABLED(CONFIG_64BIT)) + set_bit(EFI_64BIT, &efi.flags); /* * Verify the EFI Table @@ -107,7 +108,7 @@ static int __init uefi_init(void) goto out; } retval = efi_config_parse_tables(config_tables, efi.systab->nr_tables, - sizeof(efi_config_table_64_t), NULL); + sizeof(efi_config_table_t), NULL); early_memunmap(config_tables, table_size); out: |