linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: tegra: disable nonboot CPUs when reboot
Date: Fri, 7 Jun 2013 23:15:26 +0100	[thread overview]
Message-ID: <20130607221526.GC18614@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <51B25086.6020209@wwwdotorg.org>

On Fri, Jun 07, 2013 at 03:28:38PM -0600, Stephen Warren wrote:
> On 06/07/2013 12:56 PM, Stephen Warren wrote:
> ...
> > [1] Perhaps the issue is why ipi_send_stop() calls down into 
> > tegra_cpu_kill() rather than tegra_cpu_die(), since die() is what
> > should be run on the killed CPU, and kill() on the killing CPU?
> 
> Scratch that; I don't think it's calling down to /either/; I was
> confused. It seems like it /should/ call cpu_die() though, at least if
> hotplug is enabled, right?

The problem is really complex.

CPU hotplug is done in paths where we're relatively confident that the
system is working correctly.  So all the features such as scheduling
are available, the timer ticks work and so forth.

However, reboot is a totally different environment.  This can happen
from almost any context with the system in any state what so ever.  A
CPU could be stuck.  A CPU could have oopsed.  The CPU which is in
the reboot code could be the CPU which has oopsed.  It could be called
from within an interrupt...

What that means is the usual CPU hotplug methods can't be used in the
reboot path.  Well, they can, but it will be fragile.

For reboot, the real solution there is not to use software-based
reboot, but bring the other cores to a halt (which is what
ipi_send_stop is doing) and then issue a hardware reset to the whole
system, including the other CPUs.

  reply	other threads:[~2013-06-07 22:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-07  9:36 [PATCH] ARM: tegra: disable nonboot CPUs when reboot Joseph Lo
2013-06-07 16:44 ` Stephen Warren
2013-06-07 18:18   ` Will Deacon
2013-06-07 18:56     ` Stephen Warren
2013-06-07 21:28       ` Stephen Warren
2013-06-07 22:15         ` Russell King - ARM Linux [this message]
2013-06-07 22:39           ` Stephen Warren
2013-06-07 22:55             ` Russell King - ARM Linux
2013-06-10 14:42               ` Will Deacon

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=20130607221526.GC18614@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).