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: [RFC PATCH 4/5] arm64: add CPU_HOTPLUG infrastructure
Date: Thu, 11 Jul 2013 00:59:38 +0100	[thread overview]
Message-ID: <20130710235938.GA24642@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1373494549-24972-1-git-send-email-mark.rutland@arm.com>

On Wed, Jul 10, 2013 at 11:15:49PM +0100, Mark Rutland wrote:
> +	/*
> +	 * actual CPU shutdown procedure is at least platform (if not
> +	 * CPU) specific.
> +	 */
> +	if (smp_ops[cpu]->cpu_die)
> +		smp_ops[cpu]->cpu_die(cpu);
> +
> +	/*
> +	 * Do not return to the idle loop - jump back to the secondary
> +	 * cpu initialisation.  There's some initialisation which needs
> +	 * to be repeated to undo the effects of taking the CPU offline.
> +	 */
> +	__asm__("mov	sp, %0\n"
> +	"	mov	x29, #0\n"
> +	"	b	secondary_start_kernel"
> +		:
> +		: "r" (task_stack_page(current) + THREAD_START_SP));

Don't make that same mistake as on AArch32 - this will result in some
people thinking its acceptable for them to return from cpu_die().  Hot
unplug is supposed to take the CPU offline so it can be restarted as if
it was never booted in the first place.

The above "hack" in AArch32 is only there because of the sillyness of
the 32-bit ARM evaluation boards not having a way to place the
secondary CPUs back into reset or power the secondary CPUs off.

  reply	other threads:[~2013-07-10 23:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 22:11 [RFC PATCH 0/5] arm64: initial CPU_HOTPLUG support Mark Rutland
2013-07-10 22:13 ` [RFC PATCH 1/5] arm64: reorganise smp_enable_ops Mark Rutland
2013-07-10 22:15 ` [RFC PATCH 2/5] arm64: factor out spin-table boot method Mark Rutland
2013-07-10 22:15 ` [RFC PATCH 3/5] arm64: read enable-method for CPU0 Mark Rutland
2013-07-10 22:15 ` [RFC PATCH 4/5] arm64: add CPU_HOTPLUG infrastructure Mark Rutland
2013-07-10 23:59   ` Russell King - ARM Linux [this message]
2013-07-11  9:33   ` Stephen Boyd
2013-07-11 11:10     ` Mark Rutland
2013-07-10 22:16 ` [RFC PATCH 5/5] arm64: add PSCI CPU_OFF-based hotplug support Mark Rutland
2013-07-11 15:10 ` [RFC PATCH 0/5] arm64: initial CPU_HOTPLUG support Hanjun Guo
2013-07-11 16:34   ` Mark Rutland
2013-07-19 11:09     ` Hanjun Guo
2013-07-15 10:47 ` Mark Rutland
2013-07-15 13:25   ` Paul Gortmaker
2013-07-15 13:45     ` Mark Rutland

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=20130710235938.GA24642@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).