efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures
authorSai Praneeth <[email protected]>
Tue, 31 Jan 2017 13:21:35 +0000 (13:21 +0000)
committerIngo Molnar <[email protected]>
Wed, 1 Feb 2017 07:45:43 +0000 (08:45 +0100)
Since EFI_PROPERTIES_TABLE and EFI_MEMORY_ATTRIBUTES_TABLE deal with
updating memory region attributes, it makes sense to call
EFI_MEMORY_ATTRIBUTES_TABLE initialization function from the same place
as EFI_PROPERTIES_TABLE. This also moves the EFI_MEMORY_ATTRIBUTES_TABLE
initialization code to a more generic efi initialization path rather
than ARM specific efi initialization. This is important because
EFI_MEMORY_ATTRIBUTES_TABLE will be supported by x86 as well.

Signed-off-by: Sai Praneeth Prakhya <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Lee, Chun-Yi <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ravi Shankar <[email protected]>
Cc: Ricardo Neri <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
drivers/firmware/efi/arm-init.c
drivers/firmware/efi/efi.c

index f853ad2c4ca0a7d42d888cbd95844d6b132eb925..1027d7b44358d3b5806e8dcd58c65fecdcab9664 100644 (file)
@@ -250,7 +250,6 @@ void __init efi_init(void)
        }
 
        reserve_regions();
-       efi_memattr_init();
        efi_esrt_init();
        efi_memmap_unmap();
 
index 92914801e3888775708a2c3843f5a6577529d9d0..e7d404059b7316a5c5668f609ceb5957fdcdd97d 100644 (file)
@@ -529,6 +529,8 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz,
                }
        }
 
+       efi_memattr_init();
+
        /* Parse the EFI Properties table if it exists */
        if (efi.properties_table != EFI_INVALID_TABLE_ADDR) {
                efi_properties_table_t *tbl;