Skip to content

Commit 582a32e

Browse files
Ard BiesheuvelIngo Molnar
authored andcommitted
efi/arm: Revert "Defer persistent reservations until after paging_init()"
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 <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>
1 parent 8a5b403 commit 582a32e

File tree

4 files changed

+0
-15
lines changed

4 files changed

+0
-15
lines changed

arch/arm64/kernel/setup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ void __init setup_arch(char **cmdline_p)
313313
arm64_memblock_init();
314314

315315
paging_init();
316-
efi_apply_persistent_mem_reservations();
317316

318317
acpi_table_upgrade();
319318

drivers/firmware/efi/efi.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz,
592592

593593
early_memunmap(tbl, sizeof(*tbl));
594594
}
595-
return 0;
596-
}
597595

598-
int __init efi_apply_persistent_mem_reservations(void)
599-
{
600596
if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) {
601597
unsigned long prsv = efi.mem_reserve;
602598

drivers/firmware/efi/libstub/arm-stub.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ void install_memreserve_table(efi_system_table_t *sys_table_arg)
7575
efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID;
7676
efi_status_t status;
7777

78-
if (IS_ENABLED(CONFIG_ARM))
79-
return;
80-
8178
status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),
8279
(void **)&rsv);
8380
if (status != EFI_SUCCESS) {

include/linux/efi.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,8 +1198,6 @@ static inline bool efi_enabled(int feature)
11981198
extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
11991199

12001200
extern bool efi_is_table_address(unsigned long phys_addr);
1201-
1202-
extern int efi_apply_persistent_mem_reservations(void);
12031201
#else
12041202
static inline bool efi_enabled(int feature)
12051203
{
@@ -1218,11 +1216,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr)
12181216
{
12191217
return false;
12201218
}
1221-
1222-
static inline int efi_apply_persistent_mem_reservations(void)
1223-
{
1224-
return 0;
1225-
}
12261219
#endif
12271220

12281221
extern int efi_status_to_err(efi_status_t status);

0 commit comments

Comments
 (0)