summaryrefslogtreecommitdiff
path: root/arch/loongarch/include
diff options
context:
space:
mode:
authorQing Zhang <zhangqing@loongson.cn>2023-09-06 22:54:16 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2023-09-06 22:54:16 +0800
commit9fbcc076798ead2af28c854a265d9da83bec8429 (patch)
treee6a28a961e50a2a2219f101b1c9cf62310cdcbe1 /arch/loongarch/include
parentfb6d5c1d99ab6958c5e284f7aa5f0cc553f0268c (diff)
downloadlinux-9fbcc076798ead2af28c854a265d9da83bec8429.tar.gz
linux-9fbcc076798ead2af28c854a265d9da83bec8429.tar.bz2
linux-9fbcc076798ead2af28c854a265d9da83bec8429.zip
LoongArch: Simplify the processing of jumping new kernel for KASLR
Modified relocate_kernel() doesn't return new kernel's entry point but the random_offset. In this way we share the start_kernel() processing with the normal kernel, which avoids calling 'jr a0' directly and allows some other operations (e.g, kasan_early_init) before start_kernel() when KASLR (CONFIG_RANDOMIZE_BASE) is turned on. Signed-off-by: Qing Zhang <zhangqing@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include')
-rw-r--r--arch/loongarch/include/asm/setup.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/setup.h b/arch/loongarch/include/asm/setup.h
index 7c68b4365a4d..a0bc159ce8bd 100644
--- a/arch/loongarch/include/asm/setup.h
+++ b/arch/loongarch/include/asm/setup.h
@@ -34,7 +34,7 @@ extern long __la_abs_end;
extern long __rela_dyn_begin;
extern long __rela_dyn_end;
-extern void * __init relocate_kernel(void);
+extern unsigned long __init relocate_kernel(void);
#endif