]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "arm64: mm: Defer remap of linear alias of data/bss"
authorWill Deacon <will@kernel.org>
Wed, 10 Jun 2026 10:34:39 +0000 (11:34 +0100)
committerWill Deacon <will@kernel.org>
Wed, 10 Jun 2026 10:39:34 +0000 (11:39 +0100)
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 <broonie@kernel.org>
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
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 <will@kernel.org>
arch/arm64/mm/mmu.c

index 3134f1c1097ca83eb17cc1780d44559abf03ee62..d68e691c093a5f769212e42344d2fe8d6f96f4ee 100644 (file)
@@ -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)