From: Ingo Molnar Date: Fri, 3 Feb 2017 22:37:48 +0000 (+0100) Subject: sched/core: Move the get_preempt_disable_ip() inline to sched/core.c X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=59ddbcb2f45b958cf1f11f122b666cbcf50cd57b;p=openwrt%2Fstaging%2Fblogic.git sched/core: Move the get_preempt_disable_ip() inline to sched/core.c It's defined in , but nothing outside the scheduler uses it - so move it to the sched/core.c usage site. Acked-by: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- diff --git a/include/linux/sched.h b/include/linux/sched.h index c204613396cd..df42cac04243 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -3419,15 +3419,6 @@ static inline void cond_resched_rcu(void) #endif } -static inline unsigned long get_preempt_disable_ip(struct task_struct *p) -{ -#ifdef CONFIG_DEBUG_PREEMPT - return p->preempt_disable_ip; -#else - return 0; -#endif -} - /* * Does a critical section need to be broken due to another * task waiting?: (technically does not depend on CONFIG_PREEMPT, diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 7d76ccb79e91..2acdf19c5f7c 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3211,6 +3211,15 @@ static inline void preempt_latency_start(int val) { } static inline void preempt_latency_stop(int val) { } #endif +static inline unsigned long get_preempt_disable_ip(struct task_struct *p) +{ +#ifdef CONFIG_DEBUG_PREEMPT + return p->preempt_disable_ip; +#else + return 0; +#endif +} + /* * Print scheduling while atomic bug: */