mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 09:50:04 +00:00
xtensa: use MEMBLOCK_ALLOC_ANYWHERE for KASAN shadow map
commite64681b487
upstream. 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: stable@vger.kernel.org # v5.1+ Fixes:f240ec09bb
("memblock: replace memblock_alloc_base(ANYWHERE) with memblock_phys_alloc") Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
06ad673b6c
commit
1948e76afc
1 changed files with 3 additions and 1 deletions
|
@ -56,7 +56,9 @@ static void __init populate(void *start, void *end)
|
|||
|
||||
for (k = 0; k < PTRS_PER_PTE; ++k, ++j) {
|
||||
phys_addr_t phys =
|
||||
memblock_phys_alloc(PAGE_SIZE, PAGE_SIZE);
|
||||
memblock_phys_alloc_range(PAGE_SIZE, PAGE_SIZE,
|
||||
0,
|
||||
MEMBLOCK_ALLOC_ANYWHERE);
|
||||
|
||||
if (!phys)
|
||||
panic("Failed to allocate page table page\n");
|
||||
|
|
Loading…
Reference in a new issue