From 45167ba0c6b3bfdc1a76ec799869681cd4d8d68c Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 15 Nov 2021 19:44:37 +0800 Subject: [PATCH] sched: Always inline is_percpu_thread() stable inclusion from stable-5.10.74 commit bb893f075431e97dd72cde0721957a73d26578a8 bugzilla: 182986 https://gitee.com/openeuler/kernel/issues/I4I3MG Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=bb893f075431e97dd72cde0721957a73d26578a8 -------------------------------- [ Upstream commit 83d40a61046f73103b4e5d8f1310261487ff63b0 ] vmlinux.o: warning: objtool: check_preemption_disabled()+0x81: call to is_percpu_thread() leaves .noinstr.text section Reported-by: Stephen Rothwell Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210928084218.063371959@infradead.org Signed-off-by: Sasha Levin Signed-off-by: Chen Jun Reviewed-by: Weilong Chen Acked-by: Weilong Chen Signed-off-by: Chen Jun Signed-off-by: Zheng Zengkai --- include/linux/sched.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 2be6b811a468..2fd7b89c50ef 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1590,7 +1590,7 @@ extern struct pid *cad_pid; #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) #define used_math() tsk_used_math(current) -static inline bool is_percpu_thread(void) +static __always_inline bool is_percpu_thread(void) { #ifdef CONFIG_SMP return (current->flags & PF_NO_SETAFFINITY) && -- GitLab