Skip to content

Commit 1894a40

Browse files
author
Peter Zijlstra
committed
x86: Always inline on_thread_stack() and current_top_of_stack()
Becaues GCC clearly lost it's marbles again... vmlinux.o: warning: objtool: enter_from_user_mode+0x4e: call to on_thread_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x53: call to on_thread_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x4e: call to on_thread_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x4e: call to on_thread_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: enter_from_user_mode+0x4e: call to current_top_of_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode+0x53: call to current_top_of_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: syscall_enter_from_user_mode_prepare+0x4e: call to current_top_of_stack() leaves .noinstr.text section vmlinux.o: warning: objtool: irqentry_enter_from_user_mode+0x4e: call to current_top_of_stack() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 656d054 commit 1894a40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/include/asm/processor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ static __always_inline void native_swapgs(void)
559559
#endif
560560
}
561561

562-
static inline unsigned long current_top_of_stack(void)
562+
static __always_inline unsigned long current_top_of_stack(void)
563563
{
564564
/*
565565
* We can't read directly from tss.sp0: sp0 on x86_32 is special in
@@ -569,7 +569,7 @@ static inline unsigned long current_top_of_stack(void)
569569
return this_cpu_read_stable(cpu_current_top_of_stack);
570570
}
571571

572-
static inline bool on_thread_stack(void)
572+
static __always_inline bool on_thread_stack(void)
573573
{
574574
return (unsigned long)(current_top_of_stack() -
575575
current_stack_pointer) < THREAD_SIZE;

0 commit comments

Comments
 (0)