Skip to content

Commit 6cf9a2d

Browse files
Remi Denis-Courmontctmarinas
authored andcommitted
arm64: move kimage_vaddr to .rodata
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?) Signed-off-by: Rémi Denis-Courmont <[email protected]> Acked-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent dc374b4 commit 6cf9a2d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

arch/arm64/kernel/head.S

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,19 @@ SYM_FUNC_START_LOCAL(__primary_switched)
458458
b start_kernel
459459
SYM_FUNC_END(__primary_switched)
460460

461+
.pushsection ".rodata", "a"
462+
SYM_DATA_START(kimage_vaddr)
463+
.quad _text - TEXT_OFFSET
464+
SYM_DATA_END(kimage_vaddr)
465+
EXPORT_SYMBOL(kimage_vaddr)
466+
.popsection
467+
461468
/*
462469
* end early head section, begin head code that is also used for
463470
* hotplug and needs to have the same protections as the text region
464471
*/
465472
.section ".idmap.text","awx"
466473

467-
SYM_DATA_START(kimage_vaddr)
468-
.quad _text - TEXT_OFFSET
469-
SYM_DATA_END(kimage_vaddr)
470-
EXPORT_SYMBOL(kimage_vaddr)
471-
472474
/*
473475
* If we're fortunate enough to boot at EL2, ensure that the world is
474476
* sane before dropping to EL1.

0 commit comments

Comments
 (0)