efi/arm: Revert "Defer persistent reservations until after paging_init()"

This reverts commit eff896288872d687d9662000ec9ae11b6d61766f, 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 <ard.biesheuvel@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20190215123333.21209-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by Ard Biesheuvel and committed by Ingo Molnar 582a32e7 8a5b403d

Changed files
-15
arch
arm64
kernel
drivers
firmware
efi
libstub
include
linux
-1
arch/arm64/kernel/setup.c
··· 313 313 arm64_memblock_init(); 314 314 315 315 paging_init(); 316 - efi_apply_persistent_mem_reservations(); 317 316 318 317 acpi_table_upgrade(); 319 318
-4
drivers/firmware/efi/efi.c
··· 592 592 593 593 early_memunmap(tbl, sizeof(*tbl)); 594 594 } 595 - return 0; 596 - } 597 595 598 - int __init efi_apply_persistent_mem_reservations(void) 599 - { 600 596 if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) { 601 597 unsigned long prsv = efi.mem_reserve; 602 598
-3
drivers/firmware/efi/libstub/arm-stub.c
··· 75 75 efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; 76 76 efi_status_t status; 77 77 78 - if (IS_ENABLED(CONFIG_ARM)) 79 - return; 80 - 81 78 status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), 82 79 (void **)&rsv); 83 80 if (status != EFI_SUCCESS) {
-7
include/linux/efi.h
··· 1198 1198 extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); 1199 1199 1200 1200 extern bool efi_is_table_address(unsigned long phys_addr); 1201 - 1202 - extern int efi_apply_persistent_mem_reservations(void); 1203 1201 #else 1204 1202 static inline bool efi_enabled(int feature) 1205 1203 { ··· 1215 1217 static inline bool efi_is_table_address(unsigned long phys_addr) 1216 1218 { 1217 1219 return false; 1218 - } 1219 - 1220 - static inline int efi_apply_persistent_mem_reservations(void) 1221 - { 1222 - return 0; 1223 1220 } 1224 1221 #endif 1225 1222