Revert "arm64: mm: Defer remap of linear alias of data/bss"

This reverts commit 53205d5621.

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>
This commit is contained in:
Will Deacon 2026-06-10 11:34:39 +01:00
parent c34d4d48c4
commit 81479b6888

View 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)