Skip to content

Commit 4a824c3

Browse files
edumazetPeter Zijlstra
authored andcommitted
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
1 parent 8f0b4cc commit 4a824c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/irq-entry-common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static __always_inline void enter_from_user_mode(struct pt_regs *regs)
110110
static inline void local_irq_enable_exit_to_user(unsigned long ti_work);
111111

112112
#ifndef local_irq_enable_exit_to_user
113-
static inline void local_irq_enable_exit_to_user(unsigned long ti_work)
113+
static __always_inline void local_irq_enable_exit_to_user(unsigned long ti_work)
114114
{
115115
local_irq_enable();
116116
}
@@ -125,7 +125,7 @@ static inline void local_irq_enable_exit_to_user(unsigned long ti_work)
125125
static inline void local_irq_disable_exit_to_user(void);
126126

127127
#ifndef local_irq_disable_exit_to_user
128-
static inline void local_irq_disable_exit_to_user(void)
128+
static __always_inline void local_irq_disable_exit_to_user(void)
129129
{
130130
local_irq_disable();
131131
}

0 commit comments

Comments
 (0)