From: Sebastian Andrzej Siewior <[email protected]>

commit a61d1977f692e46bad99a100f264981ba08cb4bd in linux-rt-devel.

The variable takedown_cpu_task is never declared/used on !HOTPLUG_CPU
except for migrate_enable(). This leads to a link error.

Don't use takedown_cpu_task in !HOTPLUG_CPU.

Reported-by: Dick Hollenbeck <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Paul Gortmaker <[email protected]>

diff --git a/kernel/cpu.c b/kernel/cpu.c
index ebb6900d567a..f7214b073231 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -876,7 +876,9 @@ static int take_cpu_down(void *_param)
        return 0;
 }
 
+#ifdef CONFIG_PREEMPT_RT_BASE
 struct task_struct *takedown_cpu_task;
+#endif
 
 static int takedown_cpu(unsigned int cpu)
 {
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index ade332924e49..48603442abf5 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7395,9 +7395,11 @@ void migrate_enable(void)
 
        p->migrate_disable = 0;
        rq->nr_pinned--;
+#ifdef CONFIG_HOTPLUG_CPU
        if (rq->nr_pinned == 0 && unlikely(!cpu_active(cpu)) &&
            takedown_cpu_task)
                wake_up_process(takedown_cpu_task);
+#endif
 
        if (!p->migrate_disable_scheduled)
                goto out;
-- 
2.7.4

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#8681): 
https://lists.yoctoproject.org/g/linux-yocto/message/8681
Mute This Topic: https://lists.yoctoproject.org/mt/74330102/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to