summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorRemi Denis-Courmont <remi.denis.courmont@huawei.com>2020-03-12 11:40:02 +0200
committerCatalin Marinas <catalin.marinas@arm.com>2020-03-24 11:48:24 +0000
commit6cf9a2dce6bd10cf454cf6299c1c23182cb486e7 (patch)
tree74f2c68a6dba44562b9e42b10955f4daab0f4565 /arch/arm64/kernel
parentdc374b477f9233296bf2da31854e486e1781169e (diff)
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 <remi@remlab.net> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/head.S12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index a06727354fad..1923802ea962 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -458,17 +458,19 @@ SYM_FUNC_START_LOCAL(__primary_switched)
b start_kernel
SYM_FUNC_END(__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.