Skip to content

Commit 7a2512f

Browse files
soleenwilldeacon
authored andcommitted
arm64: kexec: remove cpu-reset.h
This header contains only cpu_soft_restart() which is never used directly anymore. So, remove this header, and rename the helper to be cpu_soft_restart(). Suggested-by: James Morse <[email protected]> Signed-off-by: Pasha Tatashin <[email protected]> Acked-by: Catalin Marinas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 939f1b9 commit 7a2512f

File tree

4 files changed

+11
-38
lines changed

4 files changed

+11
-38
lines changed

arch/arm64/include/asm/kexec.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ static inline void crash_prepare_suspend(void) {}
9090
static inline void crash_post_resume(void) {}
9191
#endif
9292

93+
#if defined(CONFIG_KEXEC_CORE)
94+
void cpu_soft_restart(unsigned long el2_switch, unsigned long entry,
95+
unsigned long arg0, unsigned long arg1,
96+
unsigned long arg2);
97+
#endif
98+
9399
#define ARCH_HAS_KIMAGE_ARCH
94100

95101
struct kimage_arch {

arch/arm64/kernel/cpu-reset.S

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
.pushsection .idmap.text, "awx"
1717

1818
/*
19-
* __cpu_soft_restart(el2_switch, entry, arg0, arg1, arg2) - Helper for
20-
* cpu_soft_restart.
19+
* cpu_soft_restart(el2_switch, entry, arg0, arg1, arg2)
2120
*
2221
* @el2_switch: Flag to indicate a switch to EL2 is needed.
2322
* @entry: Location to jump to for soft reset.
@@ -29,7 +28,7 @@
2928
* branch to what would be the reset vector. It must be executed with the
3029
* flat identity mapping.
3130
*/
32-
SYM_CODE_START(__cpu_soft_restart)
31+
SYM_CODE_START(cpu_soft_restart)
3332
mov_q x12, INIT_SCTLR_EL1_MMU_OFF
3433
pre_disable_mmu_workaround
3534
/*
@@ -48,6 +47,6 @@ SYM_CODE_START(__cpu_soft_restart)
4847
mov x1, x3 // arg1
4948
mov x2, x4 // arg2
5049
br x8
51-
SYM_CODE_END(__cpu_soft_restart)
50+
SYM_CODE_END(cpu_soft_restart)
5251

5352
.popsection

arch/arm64/kernel/cpu-reset.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

arch/arm64/kernel/machine_kexec.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#include <asm/sections.h>
2525
#include <asm/trans_pgd.h>
2626

27-
#include "cpu-reset.h"
28-
2927
/**
3028
* kexec_image_info - For debugging output.
3129
*/
@@ -201,10 +199,10 @@ void machine_kexec(struct kimage *kimage)
201199
* In kexec_file case, the kernel starts directly without purgatory.
202200
*/
203201
if (kimage->head & IND_DONE) {
204-
typeof(__cpu_soft_restart) *restart;
202+
typeof(cpu_soft_restart) *restart;
205203

206204
cpu_install_idmap();
207-
restart = (void *)__pa_symbol(function_nocfi(__cpu_soft_restart));
205+
restart = (void *)__pa_symbol(function_nocfi(cpu_soft_restart));
208206
restart(is_hyp_nvhe(), kimage->start, kimage->arch.dtb_mem,
209207
0, 0);
210208
} else {

0 commit comments

Comments
 (0)