Skip to content

Commit e64681b

Browse files
committed
xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map
KASAN shadow map doesn't need to be accessible through the linear kernel mapping, allocate its pages with MEMBLOCK_ALLOC_ANYWHERE so that high memory can be used. This frees up to ~100MB of low memory on xtensa configurations with KASAN and high memory. Cc: [email protected] # v5.1+ Fixes: f240ec0 ("memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc") Reviewed-by: Mike Rapoport <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent 36de10c commit e64681b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/xtensa/mm/kasan_init.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ static void __init populate(void *start, void *end)
6060

6161
for (k = 0; k < PTRS_PER_PTE; ++k, ++j) {
6262
phys_addr_t phys =
63-
memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE);
63+
memblock_phys_alloc_range(PAGE_SIZE, PAGE_SIZE,
64+
0,
65+
MEMBLOCK_ALLOC_ANYWHERE);
6466

6567
if (!phys)
6668
panic("Failed to allocate page table page\n");

0 commit comments

Comments
 (0)