Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

entry: Inline irqentry_enter/exit_from/to_user_mode()

There is no point to have this as a function which just inlines
enter_from_user_mode(). The function call overhead is larger than the
function itself.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251027084306.715309918@linutronix.de

authored by

Thomas Gleixner and committed by
Ingo Molnar
7702a9c2 54a5ab56

+11 -15
+11 -2
include/linux/irq-entry-common.h
··· 278 278 * 279 279 * The function establishes state (lockdep, RCU (context tracking), tracing) 280 280 */ 281 - void irqentry_enter_from_user_mode(struct pt_regs *regs); 281 + static __always_inline void irqentry_enter_from_user_mode(struct pt_regs *regs) 282 + { 283 + enter_from_user_mode(regs); 284 + } 282 285 283 286 /** 284 287 * irqentry_exit_to_user_mode - Interrupt exit work ··· 296 293 * Interrupt exit is not invoking #1 which is the syscall specific one time 297 294 * work. 298 295 */ 299 - void irqentry_exit_to_user_mode(struct pt_regs *regs); 296 + static __always_inline void irqentry_exit_to_user_mode(struct pt_regs *regs) 297 + { 298 + instrumentation_begin(); 299 + exit_to_user_mode_prepare(regs); 300 + instrumentation_end(); 301 + exit_to_user_mode(); 302 + } 300 303 301 304 #ifndef irqentry_state 302 305 /**
-13
kernel/entry/common.c
··· 62 62 return ti_work; 63 63 } 64 64 65 - noinstr void irqentry_enter_from_user_mode(struct pt_regs *regs) 66 - { 67 - enter_from_user_mode(regs); 68 - } 69 - 70 - noinstr void irqentry_exit_to_user_mode(struct pt_regs *regs) 71 - { 72 - instrumentation_begin(); 73 - exit_to_user_mode_prepare(regs); 74 - instrumentation_end(); 75 - exit_to_user_mode(); 76 - } 77 - 78 65 noinstr irqentry_state_t irqentry_enter(struct pt_regs *regs) 79 66 { 80 67 irqentry_state_t ret = {