This patch fixes below build error for case SMP=n:

kernel/sched/core.c: In function '__schedule':
kernel/sched/core.c:3400:2: error: implicit declaration of function 
'update_migrate_disable' [-Werror=implicit-function-declaration]
  update_migrate_disable(prev);
  ^

Signed-off-by: Grygorii Strashko <[email protected]>
---
 kernel/sched/core.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 8d9f6a6..c10ac78 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1092,6 +1092,15 @@ void check_preempt_curr(struct rq *rq, struct 
task_struct *p, int flags)
                rq_clock_skip_update(rq, true);
 }
 
+#if defined(CONFIG_PREEMPT_RT_FULL) && defined(CONFIG_SMP)
+#define MIGRATE_DISABLE_SET_AFFIN      (1<<30) /* Can't make a negative */
+#define migrate_disabled_updated(p)    ((p)->migrate_disable & 
MIGRATE_DISABLE_SET_AFFIN)
+#define migrate_disable_count(p)       ((p)->migrate_disable & 
~MIGRATE_DISABLE_SET_AFFIN)
+#else
+static inline void update_migrate_disable(struct task_struct *p) { }
+#define migrate_disabled_updated(p)            0
+#endif
+
 #ifdef CONFIG_SMP
 /*
  * This is how migration works:
@@ -1209,15 +1218,6 @@ void set_cpus_allowed_common(struct task_struct *p, 
const struct cpumask *new_ma
        p->nr_cpus_allowed = cpumask_weight(new_mask);
 }
 
-#if defined(CONFIG_PREEMPT_RT_FULL) && defined(CONFIG_SMP)
-#define MIGRATE_DISABLE_SET_AFFIN      (1<<30) /* Can't make a negative */
-#define migrate_disabled_updated(p)    ((p)->migrate_disable & 
MIGRATE_DISABLE_SET_AFFIN)
-#define migrate_disable_count(p)       ((p)->migrate_disable & 
~MIGRATE_DISABLE_SET_AFFIN)
-#else
-static inline void update_migrate_disable(struct task_struct *p) { }
-#define migrate_disabled_updated(p)            0
-#endif
-
 void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask)
 {
        struct rq *rq = task_rq(p);
-- 
2.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to