Skip to content

Commit

Permalink
arm64: head: move kimage_vaddr variable into C file
Browse files Browse the repository at this point in the history
This variable definition does not need to be in head.S so move it out.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/20220624150651.1358849-2-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Ard Biesheuvel authored and Will Deacon committed Jun 24, 2022
1 parent a111daf commit 475031b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 0 additions & 7 deletions arch/arm64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -469,13 +469,6 @@ SYM_FUNC_START_LOCAL(__primary_switched)
ASM_BUG()
SYM_FUNC_END(__primary_switched)

.pushsection ".rodata", "a"
SYM_DATA_START(kimage_vaddr)
.quad _text
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
Expand Down
3 changes: 3 additions & 0 deletions arch/arm64/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ u64 idmap_ptrs_per_pgd = PTRS_PER_PGD;
u64 __section(".mmuoff.data.write") vabits_actual;
EXPORT_SYMBOL(vabits_actual);

u64 kimage_vaddr __ro_after_init = (u64)&_text;
EXPORT_SYMBOL(kimage_vaddr);

u64 kimage_voffset __ro_after_init;
EXPORT_SYMBOL(kimage_voffset);

Expand Down

0 comments on commit 475031b

Please sign in to comment.