From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751479AbdBHSg3 (ORCPT ); Wed, 8 Feb 2017 13:36:29 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35371 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbdBHSgD (ORCPT ); Wed, 8 Feb 2017 13:36:03 -0500 From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Linus Torvalds , Mike Galbraith , Oleg Nesterov , Peter Zijlstra , Thomas Gleixner Subject: [PATCH 04/10] sched/core: Move the get_preempt_disable_ip() inline to sched/core.c Date: Wed, 8 Feb 2017 19:34:17 +0100 Message-Id: <1486578863-8903-5-git-send-email-mingo@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1486578863-8903-1-git-send-email-mingo@kernel.org> References: <1486578863-8903-1-git-send-email-mingo@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's defined in , but nothing outside the scheduler uses it - so move it to the sched/core.c usage site. Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar --- include/linux/sched.h | 9 --------- kernel/sched/core.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/linux/sched.h b/include/linux/sched.h index 255780f95de1..7710d52ad0c3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -3377,15 +3377,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 c4cebf6628de..5c010ca5b126 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -3207,6 +3207,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: */ -- 2.7.4