sched/core: migrate_enable() must access takedown_cpu_task on !HOTPLUG_CPU
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 <dick@softplc.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This commit is contained in:
parent
1158230ec6
commit
fe6fe368b0
|
@ -953,7 +953,9 @@ static int take_cpu_down(void *_param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PREEMPT_RT
|
||||
struct task_struct *takedown_cpu_task;
|
||||
#endif
|
||||
|
||||
static int takedown_cpu(unsigned int cpu)
|
||||
{
|
||||
|
|
|
@ -8257,9 +8257,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;
|
||||
|
|
Loading…
Reference in New Issue