From: Josh Poimboeuf Date: Mon, 29 Feb 2016 04:22:39 +0000 (-0600) Subject: sched: Always inline context_switch() X-Git-Tag: next-20160307~39^2~19^2~8 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=049369487e2068294b61cee19233be0ffac7d243;p=karo-tx-linux.git sched: Always inline context_switch() When CONFIG_GCOV is enabled, gcc decides to put context_switch() out-of-line, which is inconsistent with its normal behavior. It also causes an objtool warning because __schedule() no longer inlines context_switch(), so the "STACK_FRAME_NON_STANDARD(__schedule)" statement loses its effect. Signed-off-by: Josh Poimboeuf Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Bernd Petrovitsch Cc: Borislav Petkov Cc: Chris J Arges Cc: Jiri Slaby Cc: Linus Torvalds Cc: Michal Marek Cc: Namhyung Kim Cc: Pedro Alves Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: live-patching@vger.kernel.org Link: http://lkml.kernel.org/r/d62aee926b6e303394e34a06999a964dc2773cf6.1456719558.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 641043dfc773..bb0daabe0ffe 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2763,7 +2763,7 @@ asmlinkage __visible void schedule_tail(struct task_struct *prev) /* * context_switch - switch to the new MM and the new thread's register state. */ -static inline struct rq * +static __always_inline struct rq * context_switch(struct rq *rq, struct task_struct *prev, struct task_struct *next) {