diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2023-12-18 08:45:19 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-12-21 23:12:18 +0100 |
commit | caf4062e35b21cd7d3d35ac2f58f9765d02d32a0 (patch) | |
tree | 0bead20254efc88d18020039f2c3e91785e3ca71 /kernel/entry | |
parent | entry: Move exit to usermode functions to header file (diff) | |
download | linux-caf4062e35b21cd7d3d35ac2f58f9765d02d32a0.tar.xz linux-caf4062e35b21cd7d3d35ac2f58f9765d02d32a0.zip |
entry: Move enter_from_user_mode() to header file
To allow inlining of enter_from_user_mode(), move it to
entry-common.h.
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20231218074520.1998026-3-svens@linux.ibm.com
Diffstat (limited to 'kernel/entry')
-rw-r--r-- | kernel/entry/common.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/kernel/entry/common.c b/kernel/entry/common.c index 7f8f8c16140a..0616f239da4b 100644 --- a/kernel/entry/common.c +++ b/kernel/entry/common.c @@ -15,26 +15,6 @@ #define CREATE_TRACE_POINTS #include <trace/events/syscalls.h> -/* See comment for enter_from_user_mode() in entry-common.h */ -static __always_inline void __enter_from_user_mode(struct pt_regs *regs) -{ - arch_enter_from_user_mode(regs); - lockdep_hardirqs_off(CALLER_ADDR0); - - CT_WARN_ON(__ct_state() != CONTEXT_USER); - user_exit_irqoff(); - - instrumentation_begin(); - kmsan_unpoison_entry_regs(regs); - trace_hardirqs_off_finish(); - instrumentation_end(); -} - -void noinstr enter_from_user_mode(struct pt_regs *regs) -{ - __enter_from_user_mode(regs); -} - static inline void syscall_enter_audit(struct pt_regs *regs, long syscall) { if (unlikely(audit_context())) { @@ -105,7 +85,7 @@ noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) { long ret; - __enter_from_user_mode(regs); + enter_from_user_mode(regs); instrumentation_begin(); local_irq_enable(); @@ -117,7 +97,7 @@ noinstr long syscall_enter_from_user_mode(struct pt_regs *regs, long syscall) noinstr void syscall_enter_from_user_mode_prepare(struct pt_regs *regs) { - __enter_from_user_mode(regs); + enter_from_user_mode(regs); instrumentation_begin(); local_irq_enable(); instrumentation_end(); @@ -266,7 +246,7 @@ __visible noinstr void syscall_exit_to_user_mode(struct pt_regs *regs) noinstr void irqentry_enter_from_user_mode(struct pt_regs *regs) { - __enter_from_user_mode(regs); + enter_from_user_mode(regs); } noinstr void irqentry_exit_to_user_mode(struct pt_regs *regs) |