From: Will Deacon Date: Wed, 10 Jun 2026 10:34:39 +0000 (+0100) Subject: Revert "arm64: mm: Defer remap of linear alias of data/bss" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81479b6888f8ff7099103c08efab35f4817976d5;p=thirdparty%2Flinux.git Revert "arm64: mm: Defer remap of linear alias of data/bss" This reverts commit 53205d56212cbff880a77497e25a0e44036d490a. Unmapping the kernel '.bss' appears to break KVM initialisation on some devices, breaking the boot on popular platforms such as RaspberryPi3 and 4. Revert this change for now so that we can revisit it in future. Reported-by: Mark Brown Reported-by: Marek Szyprowski Link: https://lore.kernel.org/all/aicVyebkEMs6w6UV@sirena.co.uk Link: https://lore.kernel.org/r/a1b27e97-182c-485d-a448-56c19c5de2c2@samsung.com Signed-off-by: Will Deacon --- diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index 3134f1c1097ca..d68e691c093a5 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -1095,9 +1095,6 @@ void __init mark_linear_text_alias_ro(void) (unsigned long)__init_begin - (unsigned long)_text, PAGE_KERNEL_RO); - /* Map the kernel data/bss as invalid in the linear map */ - mark_linear_data_alias_valid(false); - /* * Register a PM notifier to remap the linear alias of data/bss as * valid read-only before hibernation. This is needed because the @@ -1240,6 +1237,9 @@ static void __init map_mem(void) __map_memblock(start, end, pgprot_tagged(PAGE_KERNEL), flags); } + + /* Map the kernel data/bss as invalid in the linear map */ + mark_linear_data_alias_valid(false); } void mark_rodata_ro(void)