From: Mark Rutland <mark.rutland@arm.com>
To: Geoff Levand <geoff@infradead.org>
Cc: Catalin Marinas <Catalin.Marinas@arm.com>,
Deepak Saxena <dsaxena@linaro.org>,
Will Deacon <Will.Deacon@arm.com>,
"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/8] arm64: Add spin-table cpu_die
Date: Fri, 9 May 2014 09:54:41 +0100 [thread overview]
Message-ID: <20140509085441.GE4757@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <56b0c0f2834cba63db1f75966f2ee756ab347205.1399594544.git.geoff@infradead.org>
On Fri, May 09, 2014 at 01:48:17AM +0100, Geoff Levand wrote:
> Add two new minimal routines smp_spin_table_cpu_disable() and
> smp_spin_table_cpu_die() and hook them up to the smp_spin_table_ops instance.
>
> Kexec support will use smp_spin_table_cpu_die() for re-boot of spin table CPUs,
> but also needs a compatible smp_spin_table_cpu_disable() to allow
> execution to reach smp_spin_table_cpu_die().
>
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
> arch/arm64/kernel/smp_spin_table.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c
> index 7a530d2..26c780b 100644
> --- a/arch/arm64/kernel/smp_spin_table.c
> +++ b/arch/arm64/kernel/smp_spin_table.c
> @@ -142,10 +142,23 @@ static void smp_spin_table_cpu_postboot(void)
> raw_spin_unlock(&boot_lock);
> }
>
> +static int smp_spin_table_cpu_disable(unsigned int cpu)
> +{
> + return 0;
If we cannot kill the CPU then we need to fail here. cpu_disable is
called early enough that the cpu hotplug infrastructure can recover if
we cannot disable the CPU.
> +}
> +
> +static void smp_spin_table_cpu_die(unsigned int cpu)
> +{
> + while (1)
> + cpu_relax();
This does not kill the CPU -- it's stuck spinning on some instructions
that might get clobbered upon a kexec. So this is insufficient for
kexec.
This also doesn't allow the CPU to be brought back, so it's completely
useless as-is.
NAK for pseudo-hotplug. If we cannot place the CPU somewhere out of the
way of the kernel then we _must_ fail.
Thanks,
Mark.
> +}
> +
> const struct cpu_operations smp_spin_table_ops = {
> .name = "spin-table",
> .cpu_init = smp_spin_table_cpu_init,
> .cpu_prepare = smp_spin_table_cpu_prepare,
> .cpu_boot = smp_spin_table_cpu_boot,
> .cpu_postboot = smp_spin_table_cpu_postboot,
> + .cpu_disable = smp_spin_table_cpu_disable,
> + .cpu_die = smp_spin_table_cpu_die,
> };
> --
> 1.9.1
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-05-09 8:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 0:48 [PATCH 0/8] arm64 kexec kernel patches Geoff Levand
2014-05-09 0:48 ` [PATCH 3/8] arm64: Add spin-table cpu_die Geoff Levand
2014-05-09 8:54 ` Mark Rutland [this message]
2014-05-09 0:48 ` [PATCH 6/8] arm64/kexec: kexec needs cpu_die Geoff Levand
2014-05-09 8:24 ` Mark Rutland
2014-05-13 22:27 ` Geoff Levand
2014-05-09 0:48 ` [PATCH 7/8] arm64/kexec: Add core kexec support Geoff Levand
2014-05-09 15:36 ` Mark Rutland
2014-05-13 22:27 ` Geoff Levand
2014-05-16 10:26 ` Mark Rutland
2014-05-14 10:54 ` Catalin Marinas
2014-05-14 23:20 ` Geoff Levand
2014-07-07 7:33 ` Dave Young
2014-07-11 9:47 ` Dave Young
2014-05-09 0:48 ` [PATCH 8/8] arm64: Enable kexec in defconfig Geoff Levand
2014-05-09 0:48 ` [PATCH 4/8] arm64: Add smp_spin_table_set_die Geoff Levand
2014-05-09 0:48 ` [PATCH 2/8] arm64: Make cpu_read_ops generic Geoff Levand
2014-05-09 0:48 ` [PATCH 5/8] arm64: Split soft_restart into two stages Geoff Levand
2014-05-09 0:48 ` [PATCH 1/8] arm64: Use cpu_ops for smp_stop Geoff Levand
2014-05-09 8:44 ` Mark Rutland
2014-05-13 22:27 ` Geoff Levand
2014-05-09 16:22 ` [PATCH 0/8] arm64 kexec kernel patches Mark Rutland
2014-05-13 22:26 ` Geoff Levand
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=20140509085441.GE4757@e106331-lin.cambridge.arm.com \
--to=mark.rutland@arm.com \
--cc=Catalin.Marinas@arm.com \
--cc=Will.Deacon@arm.com \
--cc=dsaxena@linaro.org \
--cc=geoff@infradead.org \
--cc=kexec@lists.infradead.org \
--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).