From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Subject: Re: [PATCH] ARM: tegra: disable nonboot CPUs when reboot
Date: Fri, 07 Jun 2013 10:44:33 -0600 [thread overview]
Message-ID: <51B20DF1.3030207@wwwdotorg.org> (raw)
In-Reply-To: <1370597810-1153-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On 06/07/2013 03:36 AM, Joseph Lo wrote:
> The normal CPU hotplug flow in kernel and the flow for Tegra we expected,
> is checking the CPU ID is OK for hotplug by "tegra_cpu_disable", the CPU
> that would be hotplugged runs into a power-gate state by "tegra_cpu_die",
> then the other CPU waits for the CPU that was hotplugged in reset and
> clock gate it by "tegra_cpu_kill". That means we don't support the CPU
> being stopped or put into offline by trigger "tegra_cpu_kill" directly.
> It may cause a busy loop for waiting CPU in reset.
>
> After the commit "62e930e reboot: rigrate shutdown/reboot to boot cpu",
> we remove "disable_nonboot_cpus" when kernel_{restart,halt,power_off}.
> But the ARM kernel trigger "send_smp_stop" when machine_shutdown, that
> would cause the "tegra_cpu_kill" directly without "tegra_cpu_die" first.
>
> We hook "disable_nonboot_cpus" in "reboot_notifier" to avoid that happens.
> And it can work for reboot, shutdown, halt and kexec.
I don't believe this is the correct solution.
If the semantics of cpu_kill/cpu_die are such that it's legal to call
only cpu_kill without having cause cpu_die to run on the killed CPU
first, then Tegra's implementation is buggy. We should simply fix that,
rather than avoiding this by forcing a different order for the calls to
cpu_kill/cpu_die.
If the semantics of cpu_kill/cpu_die are such that one /must/ cause
cpu_die to run on the killed CPU before cpu_kill can be used on it, then
there's a bug in the code that isn't doing that.
I'm CCing a few people in an attempt to find out exactly what the
expected semantics are for cpu_kill/cpu_die; is it legal to call
cpu_kill without having first caused cpu_die to execute?
WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: tegra: disable nonboot CPUs when reboot
Date: Fri, 07 Jun 2013 10:44:33 -0600 [thread overview]
Message-ID: <51B20DF1.3030207@wwwdotorg.org> (raw)
In-Reply-To: <1370597810-1153-1-git-send-email-josephl@nvidia.com>
On 06/07/2013 03:36 AM, Joseph Lo wrote:
> The normal CPU hotplug flow in kernel and the flow for Tegra we expected,
> is checking the CPU ID is OK for hotplug by "tegra_cpu_disable", the CPU
> that would be hotplugged runs into a power-gate state by "tegra_cpu_die",
> then the other CPU waits for the CPU that was hotplugged in reset and
> clock gate it by "tegra_cpu_kill". That means we don't support the CPU
> being stopped or put into offline by trigger "tegra_cpu_kill" directly.
> It may cause a busy loop for waiting CPU in reset.
>
> After the commit "62e930e reboot: rigrate shutdown/reboot to boot cpu",
> we remove "disable_nonboot_cpus" when kernel_{restart,halt,power_off}.
> But the ARM kernel trigger "send_smp_stop" when machine_shutdown, that
> would cause the "tegra_cpu_kill" directly without "tegra_cpu_die" first.
>
> We hook "disable_nonboot_cpus" in "reboot_notifier" to avoid that happens.
> And it can work for reboot, shutdown, halt and kexec.
I don't believe this is the correct solution.
If the semantics of cpu_kill/cpu_die are such that it's legal to call
only cpu_kill without having cause cpu_die to run on the killed CPU
first, then Tegra's implementation is buggy. We should simply fix that,
rather than avoiding this by forcing a different order for the calls to
cpu_kill/cpu_die.
If the semantics of cpu_kill/cpu_die are such that one /must/ cause
cpu_die to run on the killed CPU before cpu_kill can be used on it, then
there's a bug in the code that isn't doing that.
I'm CCing a few people in an attempt to find out exactly what the
expected semantics are for cpu_kill/cpu_die; is it legal to call
cpu_kill without having first caused cpu_die to execute?
next prev parent reply other threads:[~2013-06-07 16:44 UTC|newest]
Thread overview: 18+ 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 9:36 ` Joseph Lo
[not found] ` <1370597810-1153-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-07 16:44 ` Stephen Warren [this message]
2013-06-07 16:44 ` Stephen Warren
[not found] ` <51B20DF1.3030207-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-06-07 18:18 ` Will Deacon
2013-06-07 18:18 ` Will Deacon
[not found] ` <20130607181846.GL8111-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2013-06-07 18:56 ` Stephen Warren
2013-06-07 18:56 ` Stephen Warren
[not found] ` <51B22CDC.4080200-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-06-07 21:28 ` Stephen Warren
2013-06-07 21:28 ` Stephen Warren
[not found] ` <51B25086.6020209-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-06-07 22:15 ` Russell King - ARM Linux
2013-06-07 22:15 ` Russell King - ARM Linux
[not found] ` <20130607221526.GC18614-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-06-07 22:39 ` Stephen Warren
2013-06-07 22:39 ` Stephen Warren
[not found] ` <51B26124.5060505-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-06-07 22:55 ` Russell King - ARM Linux
2013-06-07 22:55 ` Russell King - ARM Linux
[not found] ` <20130607225512.GF18614-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2013-06-10 14:42 ` Will Deacon
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=51B20DF1.3030207@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.