linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Paul Thomas <pthomas8589@gmail.com>
Cc: Dick Hollenbeck <dick@softplc.com>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	Scott Wood <swood@redhat.com>
Subject: [PATCH] sched/core: migrate_enable() must access takedown_cpu_task on !HOTPLUG_CPU
Date: Fri, 29 Nov 2019 17:43:07 +0100	[thread overview]
Message-ID: <20191129164307.mvhdaliovxanmsf5@linutronix.de> (raw)
In-Reply-To: <CAD56B7ej=hR0ye-ser9P3ROraBr2PJABD64K=w2XG7fwfozToQ@mail.gmail.com>

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.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 kernel/cpu.c        | 2 ++
 kernel/sched/core.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index 123ad9626cc7f..81a6e5068972c 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -887,7 +887,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)
 {
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bd26257eb2358..8bea013b2baf5 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -8212,9 +8212,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.24.0


      reply	other threads:[~2019-11-29 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 19:21 Need help building for aarch64 kernel 5.2 Dick Hollenbeck
2019-11-12 20:33 ` Paul Thomas
2019-11-13 18:02   ` Dick Hollenbeck
2019-11-13 21:29     ` Paul Thomas
2019-11-29 16:43       ` Sebastian Andrzej Siewior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191129164307.mvhdaliovxanmsf5@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=dick@softplc.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=pthomas8589@gmail.com \
    --cc=swood@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).