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:55:12 +0100	[thread overview]
Message-ID: <20130607225512.GF18614@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <51B26124.5060505@wwwdotorg.org>

On Fri, Jun 07, 2013 at 04:39:32PM -0600, Stephen Warren wrote:
> On 06/07/2013 04:15 PM, Russell King - ARM Linux wrote:
> > 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.
> 
> Ignoring the issues with oops in reboot, I think there's a bug in that
> when hotplug is enabled, smp_kill_cpus() calls platform_cpu_kill(), but
> nothing causes the failing CPU to ever execute smp_ops.cpu_die(). Hence,
> if the implementation of smp_ops.cpu_kill() relies on the target CPU
> having run smp_ops.cpu_die(), then smp_ops.cpu_kill() may not operate
> correctly.

Well, smp_kill_cpus() was added to get around the kexec problem -
transitioning from one kernel to the next kernel without going through
a hardware reset.  Maybe if we take a step back...

1. remove smp_kill_cpus() from smp_send_stop().
2. remove machine_shutdown() from machine_halt(), machine_power_off()
   and machine_restart().
3. call smp_send_stop() only from machine_halt(), machine_power_off() and
   machine_restart()
4. require a hardware-based reboot method for all SMP implementations;
   using soft_reboot() is not an option.

This should get us into the situation where we have a reliable method of
halting and rebooting the kernel everywhere, leaving kexec as being the
remaining problem case.

Currently, for that we effectively do smp_send_stop() followed by
smp_kill_cpus().  The no-op change for kexec there is to allow
smp_kill_cpus() to be called directly from machine_shutdown() - but
I suspect there will still be stuff that's broken with that...

So the ongoing problem remains - how to deal with kexec in a SMP
environment where it's difficult to reliably take a secondary CPU
offline to a safe place and then be able to restart it into the
next kernel...

  reply	other threads:[~2013-06-07 22:55 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
2013-06-07 22:39           ` Stephen Warren
2013-06-07 22:55             ` Russell King - ARM Linux [this message]
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=20130607225512.GF18614@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).