mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hu Keping <hukeping@huawei.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: <swarren@nvidia.com>, <ebiederm@xmission.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <sdu.liu@huawei.com>,
	<wangnan0@huawei.com>, <peifeiyue@huawei.com>
Subject: Re: [RESEND PATCH] ARM: kexec: Fix validating CPU hotplug support
Date: Wed, 5 Nov 2014 18:57:06 +0800	[thread overview]
Message-ID: <545A0282.4070001@huawei.com> (raw)
In-Reply-To: <20141104105525.GE4042@n2100.arm.linux.org.uk>



于 2014/11/4 18:55, Russell King - ARM Linux 写道:
> On Tue, Nov 04, 2014 at 05:40:25PM +0800, HuKeping wrote:
>> Commit 2103f6cba61a8b8bea3fc1b63661d830a2125e76 added a hotplug checking in
>> machine_kexec_prepare(), but it will lead a failure when loading the
>> crash-kernel in some cases.
>>
>> Kexec utility can load the crash kernel by two ways:
>> 1. kexec -l kernel-image
>> 2. kexec -p kernel-image
>>
>> In case #1, for rapid reboot, it's correct to do the hotplug checking things,
>> for it will shut down cpus in _cpu_down() later when command "kexec -e" be
>> sent, this routine needs the support of cpu hotplug.
>>
>> In case #2, for use on panic, it's unnecessary to do the same thing, the whole
>> routing has no business with cpu shutting down. Check for cpu hot plug will
>> lead a failure to load the kernel.
>
> So what happens to the other CPUs when you kexec into the new kernel,
> possibly overwriting the instructions which those CPUs are executing?
>

Actually, i do think there is something wrong in the panic-rountine:
when panic comes, we clear the cpu_online_bits of other CPUs and
keep them calling cpu_relax(). That's why I post that patch ,because
we do not really shut down the CPUs.

But as your mentioned , there is another problem:
what's in the pc register of each cpu is unknown after the MMU has been
shut down.

On X86, there is a halt() before the cpu_relax(), so do you think we
need a call wfi() before cpu_relax() to keep the other CPUs on
status-WFI on ARM?


  reply	other threads:[~2014-11-05 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04  9:40 HuKeping
2014-11-04 10:55 ` Russell King - ARM Linux
2014-11-05 10:57   ` Hu Keping [this message]
2014-11-05 11:08     ` Russell King - ARM Linux

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=545A0282.4070001@huawei.com \
    --to=hukeping@huawei.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=peifeiyue@huawei.com \
    --cc=sdu.liu@huawei.com \
    --cc=swarren@nvidia.com \
    --cc=wangnan0@huawei.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

all inboxes | Powered by JetHome®