Skip to content

Commit 6ecbc78

Browse files
mrutland-armwilldeacon
authored andcommitted
arm64: entry: make NMI entry/exit functions static
Now that we only call arm64_enter_nmi() and arm64_exit_nmi() from within entry-common.c, let's make these static to ensure this remains the case. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Joey Gouly <joey.gouly@arm.com> Cc: James Morse <james.morse@arm.com> Cc: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210607094624.34689-19-mark.rutland@arm.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent d60b228 commit 6ecbc78

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

arch/arm64/include/asm/exception.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ asmlinkage void call_on_irq_stack(struct pt_regs *regs,
5757
void (*func)(struct pt_regs *));
5858
asmlinkage void enter_from_user_mode(void);
5959
asmlinkage void exit_to_user_mode(void);
60-
void arm64_enter_nmi(struct pt_regs *regs);
61-
void arm64_exit_nmi(struct pt_regs *regs);
6260
void do_mem_abort(unsigned long far, unsigned int esr, struct pt_regs *regs);
6361
void do_undefinstr(struct pt_regs *regs);
6462
void do_bti(struct pt_regs *regs);

arch/arm64/kernel/entry-common.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ static void noinstr exit_to_kernel_mode(struct pt_regs *regs)
7575
}
7676
}
7777

78-
void noinstr arm64_enter_nmi(struct pt_regs *regs)
78+
static void noinstr arm64_enter_nmi(struct pt_regs *regs)
7979
{
8080
regs->lockdep_hardirqs = lockdep_hardirqs_enabled();
8181

@@ -88,7 +88,7 @@ void noinstr arm64_enter_nmi(struct pt_regs *regs)
8888
ftrace_nmi_enter();
8989
}
9090

91-
void noinstr arm64_exit_nmi(struct pt_regs *regs)
91+
static void noinstr arm64_exit_nmi(struct pt_regs *regs)
9292
{
9393
bool restore = regs->lockdep_hardirqs;
9494

0 commit comments

Comments
 (0)