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

Commit 9ace17ce authored by Remi Denis-Courmont's avatar Remi Denis-Courmont Committed by Giuliano Procida
Browse files

BACKPORT: arm64: move kimage_vaddr to .rodata



Clean backport.

This datum is not referenced from .idmap.text: it does not need to be
mapped in idmap. Lets move it to .rodata as it is never written to after
early boot of the primary CPU.
(Maybe .data.ro_after_init would be cleaner though?)

Bug: 352610488
Change-Id: I83bc69358eca7eca1a5e9916bc6fe477f1c6ef96
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
Acked-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 6cf9a2dce6bd10cf454cf6299c1c23182cb486e7)
Signed-off-by: default avatarGiuliano Procida <gprocida@google.com>
parent db0d3aee
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -470,17 +470,19 @@ __primary_switched:
	b	start_kernel
ENDPROC(__primary_switched)

	.pushsection ".rodata", "a"
SYM_DATA_START(kimage_vaddr)
	.quad		_text - TEXT_OFFSET
SYM_DATA_END(kimage_vaddr)
EXPORT_SYMBOL(kimage_vaddr)
	.popsection

/*
 * end early head section, begin head code that is also used for
 * hotplug and needs to have the same protections as the text region
 */
	.section ".idmap.text","awx"

SYM_DATA_START(kimage_vaddr)
	.quad		_text - TEXT_OFFSET
SYM_DATA_END(kimage_vaddr)
EXPORT_SYMBOL(kimage_vaddr)

/*
 * If we're fortunate enough to boot at EL2, ensure that the world is
 * sane before dropping to EL1.