+11
arch/arm64/include/asm/memory.h
+11
arch/arm64/include/asm/memory.h
···
332
332
#define virt_addr_valid(kaddr) \
333
333
(_virt_addr_is_linear(kaddr) && _virt_addr_valid(kaddr))
334
334
335
+
/*
336
+
* Given that the GIC architecture permits ITS implementations that can only be
337
+
* configured with a LPI table address once, GICv3 systems with many CPUs may
338
+
* end up reserving a lot of different regions after a kexec for their LPI
339
+
* tables (one per CPU), as we are forced to reuse the same memory after kexec
340
+
* (and thus reserve it persistently with EFI beforehand)
341
+
*/
342
+
#if defined(CONFIG_EFI) && defined(CONFIG_ARM_GIC_V3_ITS)
343
+
# define INIT_MEMBLOCK_RESERVED_REGIONS (INIT_MEMBLOCK_REGIONS + NR_CPUS + 1)
344
+
#endif
345
+
335
346
#include <asm-generic/memory_model.h>
336
347
337
348
#endif
-1
arch/arm64/kernel/setup.c
-1
arch/arm64/kernel/setup.c
-4
drivers/firmware/efi/efi.c
-4
drivers/firmware/efi/efi.c
-3
drivers/firmware/efi/libstub/arm-stub.c
-3
drivers/firmware/efi/libstub/arm-stub.c
-7
include/linux/efi.h
-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
-3
include/linux/memblock.h
-3
include/linux/memblock.h
+9
-2
mm/memblock.c
+9
-2
mm/memblock.c
···
26
26
27
27
#include "internal.h"
28
28
29
+
#define INIT_MEMBLOCK_REGIONS 128
30
+
#define INIT_PHYSMEM_REGIONS 4
31
+
32
+
#ifndef INIT_MEMBLOCK_RESERVED_REGIONS
33
+
# define INIT_MEMBLOCK_RESERVED_REGIONS INIT_MEMBLOCK_REGIONS
34
+
#endif
35
+
29
36
/**
30
37
* DOC: memblock overview
31
38
*
···
99
92
unsigned long long max_possible_pfn;
100
93
101
94
static struct memblock_region memblock_memory_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
102
-
static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_REGIONS] __initdata_memblock;
95
+
static struct memblock_region memblock_reserved_init_regions[INIT_MEMBLOCK_RESERVED_REGIONS] __initdata_memblock;
103
96
#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP
104
97
static struct memblock_region memblock_physmem_init_regions[INIT_PHYSMEM_REGIONS] __initdata_memblock;
105
98
#endif
···
112
105
113
106
.reserved.regions = memblock_reserved_init_regions,
114
107
.reserved.cnt = 1, /* empty dummy entry */
115
-
.reserved.max = INIT_MEMBLOCK_REGIONS,
108
+
.reserved.max = INIT_MEMBLOCK_RESERVED_REGIONS,
116
109
.reserved.name = "reserved",
117
110
118
111
#ifdef CONFIG_HAVE_MEMBLOCK_PHYS_MAP