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

Commit 21eeca64 authored by Sudarshan Rajagopalan's avatar Sudarshan Rajagopalan Committed by Swathi Sridhar
Browse files

arm64: Force non-block mappings for memory hotplug



Force non-block mappings to be created when
DEBUG_PAGEALLOC is enabled.

Change-Id: I467ece9a7c9cef8b198ace6c5a795f203db38845
Signed-off-by: default avatarSudarshan Rajagopalan <sudaraja@codeaurora.org>
parent 108c8433
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -708,11 +708,13 @@ void hotplug_paging(phys_addr_t start, phys_addr_t size)
	struct page *pg;
	phys_addr_t pgd_phys = pgd_pgtable_alloc();
	pgd_t *pgd = pgd_set_fixmap(pgd_phys);
	int flags;

	memcpy(pgd, swapper_pg_dir, PAGE_SIZE);
	flags = debug_pagealloc_enabled() ? NO_BLOCK_MAPPINGS : 0;

	__create_pgd_mapping(pgd, start, __phys_to_virt(start), size,
		PAGE_KERNEL, pgd_pgtable_alloc, !debug_pagealloc_enabled());
		PAGE_KERNEL, pgd_pgtable_alloc, flags);

	cpu_replace_ttbr1(__va(pgd_phys));
	memcpy(swapper_pg_dir, pgd, PAGE_SIZE);