diff options
author | Pasha Tatashin <pasha.tatashin@soleen.com> | 2021-09-30 14:31:08 +0000 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2021-10-01 13:31:00 +0100 |
commit | 19a046f07ce5a5c34ebb6432192d98cfdb38444f (patch) | |
tree | 6fef169425715072bc67c45b1bf423e241609cc0 /arch/arm64/kernel/relocate_kernel.S | |
parent | ba959fe96a1bbb98765762da20ecb3a6eb9c9d39 (diff) | |
download | linux-19a046f07ce5a5c34ebb6432192d98cfdb38444f.tar.gz |
arm64: kexec: use ld script for relocation function
Currently, relocation code declares start and end variables
which are used to compute its size.
The better way to do this is to use ld script, and put relocation
function in its own section.
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210930143113.1502553-11-pasha.tatashin@soleen.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/relocate_kernel.S')
-rw-r--r-- | arch/arm64/kernel/relocate_kernel.S | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/arm64/kernel/relocate_kernel.S b/arch/arm64/kernel/relocate_kernel.S index b4fb97312a80..2227741b96fa 100644 --- a/arch/arm64/kernel/relocate_kernel.S +++ b/arch/arm64/kernel/relocate_kernel.S @@ -15,6 +15,7 @@ #include <asm/sysreg.h> #include <asm/virt.h> +.section ".kexec_relocate.text", "ax" /* * arm64_relocate_new_kernel - Put a 2nd stage image in place and boot it. * @@ -77,16 +78,3 @@ SYM_CODE_START(arm64_relocate_new_kernel) mov x3, xzr br x4 /* Jumps from el1 */ SYM_CODE_END(arm64_relocate_new_kernel) - -.align 3 /* To keep the 64-bit values below naturally aligned. */ - -.Lcopy_end: -.org KEXEC_CONTROL_PAGE_SIZE - -/* - * arm64_relocate_new_kernel_size - Number of bytes to copy to the - * control_code_page. - */ -.globl arm64_relocate_new_kernel_size -arm64_relocate_new_kernel_size: - .quad .Lcopy_end - arm64_relocate_new_kernel |