1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00

entry: Always inline local_irq_{enable,disable}_exit_to_user()

clang needs __always_inline instead of inline, even for tiny helpers.

This saves some cycles in system call fast path, and saves 195 bytes
on x86_64 build:

$ size vmlinux.before vmlinux.after
   text	   data	    bss	    dec	    hex	filename
34652814	22291961	5875180	62819955	3be8e73	vmlinux.before
34652619	22291961	5875180	62819760	3be8db0	vmlinux.after

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251204153127.1321824-1-edumazet@google.com
This commit is contained in:
Eric Dumazet 2025-12-04 15:31:27 +00:00 committed by Peter Zijlstra
parent 8f0b4cce44
commit 4a824c3128

View File

@ -110,7 +110,7 @@ static __always_inline void enter_from_user_mode(struct pt_regs *regs)
static inline void local_irq_enable_exit_to_user(unsigned long ti_work); static inline void local_irq_enable_exit_to_user(unsigned long ti_work);
#ifndef local_irq_enable_exit_to_user #ifndef local_irq_enable_exit_to_user
static inline void local_irq_enable_exit_to_user(unsigned long ti_work) static __always_inline void local_irq_enable_exit_to_user(unsigned long ti_work)
{ {
local_irq_enable(); local_irq_enable();
} }
@ -125,7 +125,7 @@ static inline void local_irq_enable_exit_to_user(unsigned long ti_work)
static inline void local_irq_disable_exit_to_user(void); static inline void local_irq_disable_exit_to_user(void);
#ifndef local_irq_disable_exit_to_user #ifndef local_irq_disable_exit_to_user
static inline void local_irq_disable_exit_to_user(void) static __always_inline void local_irq_disable_exit_to_user(void)
{ {
local_irq_disable(); local_irq_disable();
} }