forked from luck/tmp_suning_uos_patched
efi/arm: Revert "Defer persistent reservations until after paging_init()"
This reverts commit eff8962888
, 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>
This commit is contained in:
parent
8a5b403d71
commit
582a32e708
|
@ -313,7 +313,6 @@ void __init setup_arch(char **cmdline_p)
|
||||||
arm64_memblock_init();
|
arm64_memblock_init();
|
||||||
|
|
||||||
paging_init();
|
paging_init();
|
||||||
efi_apply_persistent_mem_reservations();
|
|
||||||
|
|
||||||
acpi_table_upgrade();
|
acpi_table_upgrade();
|
||||||
|
|
||||||
|
|
|
@ -592,11 +592,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz,
|
||||||
|
|
||||||
early_memunmap(tbl, sizeof(*tbl));
|
early_memunmap(tbl, sizeof(*tbl));
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int __init efi_apply_persistent_mem_reservations(void)
|
|
||||||
{
|
|
||||||
if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) {
|
if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) {
|
||||||
unsigned long prsv = efi.mem_reserve;
|
unsigned long prsv = efi.mem_reserve;
|
||||||
|
|
||||||
|
|
|
@ -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_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID;
|
||||||
efi_status_t status;
|
efi_status_t status;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_ARM))
|
|
||||||
return;
|
|
||||||
|
|
||||||
status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),
|
status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv),
|
||||||
(void **)&rsv);
|
(void **)&rsv);
|
||||||
if (status != EFI_SUCCESS) {
|
if (status != EFI_SUCCESS) {
|
||||||
|
|
|
@ -1198,8 +1198,6 @@ static inline bool efi_enabled(int feature)
|
||||||
extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
|
extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused);
|
||||||
|
|
||||||
extern bool efi_is_table_address(unsigned long phys_addr);
|
extern bool efi_is_table_address(unsigned long phys_addr);
|
||||||
|
|
||||||
extern int efi_apply_persistent_mem_reservations(void);
|
|
||||||
#else
|
#else
|
||||||
static inline bool efi_enabled(int feature)
|
static inline bool efi_enabled(int feature)
|
||||||
{
|
{
|
||||||
|
@ -1218,11 +1216,6 @@ static inline bool efi_is_table_address(unsigned long phys_addr)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int efi_apply_persistent_mem_reservations(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int efi_status_to_err(efi_status_t status);
|
extern int efi_status_to_err(efi_status_t status);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user