Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fee036a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull EFI fixes from Ingo Molnar:
 "This tree reverts a GICv3 commit (which was broken) and fixes it in
  another way, by adding a memblock build-time entries quirk for ARM64"

* 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi/arm: Revert "Defer persistent reservations until after paging_init()"
  arm64, mm, efi: Account for GICv3 LPI tables in static memblock reserve table
parents 8d33316d 582a32e7
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -332,6 +332,17 @@ static inline void *phys_to_virt(phys_addr_t x)
#define virt_addr_valid(kaddr)		\
	(_virt_addr_is_linear(kaddr) && _virt_addr_valid(kaddr))

/*
 * Given that the GIC architecture permits ITS implementations that can only be
 * configured with a LPI table address once, GICv3 systems with many CPUs may
 * end up reserving a lot of different regions after a kexec for their LPI
 * tables (one per CPU), as we are forced to reuse the same memory after kexec
 * (and thus reserve it persistently with EFI beforehand)
 */
#if defined(CONFIG_EFI) && defined(CONFIG_ARM_GIC_V3_ITS)
# define INIT_MEMBLOCK_RESERVED_REGIONS	(INIT_MEMBLOCK_REGIONS + NR_CPUS + 1)
#endif

#include <asm-generic/memory_model.h>

#endif
+0 −1
Original line number Diff line number Diff line
@@ -313,7 +313,6 @@ void __init setup_arch(char **cmdline_p)
	arm64_memblock_init();

	paging_init();
	efi_apply_persistent_mem_reservations();

	acpi_table_upgrade();

+0 −4
Original line number Diff line number Diff line
@@ -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;

+0 −3
Original line number Diff line number Diff line
@@ -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) {
+0 −7
Original line number Diff line number Diff line
@@ -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)
{
@@ -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);
Loading