Skip to content

Commit

Permalink
efi/arm: Revert "Defer persistent reservations until after paging_ini…
Browse files Browse the repository at this point in the history
…t()"

This reverts commit eff8962, which
deferred the processing of persistent memory reservations to a point
where the memory may have already been allocated and overwritten,
defeating the purpose.

Signed-off-by: Ard Biesheuvel <[email protected]>
Acked-by: Will Deacon <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Marc Zyngier <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Ard Biesheuvel authored and Ingo Molnar committed Feb 16, 2019
1 parent 8a5b403 commit 582a32e
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion arch/arm64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ void __init setup_arch(char **cmdline_p)
arm64_memblock_init();

paging_init();
efi_apply_persistent_mem_reservations();

acpi_table_upgrade();

Expand Down
4 changes: 0 additions & 4 deletions drivers/firmware/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,11 +592,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz,

early_memunmap(tbl, sizeof(*tbl));
}
return 0;
}

int __init efi_apply_persistent_mem_reservations(void)
{
if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) {
unsigned long prsv = efi.mem_reserve;

Expand Down
3 changes: 0 additions & 3 deletions drivers/firmware/efi/libstub/arm-stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ void install_memreserve_table(efi_system_table_t *sys_table_arg)
efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID;
efi_status_t status;

if (IS_ENABLED(CONFIG_ARM))
return;

status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),
(void **)&rsv);
if (status != EFI_SUCCESS) {
Expand Down
7 changes: 0 additions & 7 deletions include/linux/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,6 @@ static inline bool efi_enabled(int feature)
extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);

extern bool efi_is_table_address(unsigned long phys_addr);

extern int efi_apply_persistent_mem_reservations(void);
#else
static inline bool efi_enabled(int feature)
{
Expand All @@ -1218,11 +1216,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr)
{
return false;
}

static inline int efi_apply_persistent_mem_reservations(void)
{
return 0;
}
#endif

extern int efi_status_to_err(efi_status_t status);
Expand Down

0 comments on commit 582a32e

Please sign in to comment.