From: Suzuki.Poulose@arm.com (Suzuki K Poulose)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] arm64: smp: Add function to determine if cpus are stuck in the kernel
Date: Fri, 17 Jun 2016 17:39:55 +0100 [thread overview]
Message-ID: <576427DB.6020600@arm.com> (raw)
In-Reply-To: <1466181432.7965.2.camel@infradead.org>
On 17/06/16 17:37, Geoff Levand wrote:
> On Fri, 2016-06-17 at 10:34 +0100, James Morse wrote:
>> +bool cpus_are_stuck_in_kernel(void)
>> +{
>> +> > bool ret = !!cpus_stuck_in_kernel;
>> +#ifdef CONFIG_HOTPLUG_CPU
>
> How about using 'if (IS_ENABLED(CONFIG_HOTPLUG_CPU))' here?
>
>> + int any_cpu = raw_smp_processor_id();
>> +
>> +> > if (num_possible_cpus() > 1 && !cpu_ops[any_cpu]->cpu_die)
>> +> > > ret = true;
>> +#endif
>
That won't work, as the cpu_ops->cpu_die is defined only if CONFIG_HOTPLUG_CPU.
May be we should fix that.
Suzuki
next prev parent reply other threads:[~2016-06-17 16:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 9:34 [PATCH 0/2] Fix hibernate on SMP spin-table systems James Morse
2016-06-17 9:34 ` [PATCH 1/2] arm64: smp: Add function to determine if cpus are stuck in the kernel James Morse
2016-06-17 10:27 ` Mark Rutland
2016-06-17 11:16 ` Suzuki K Poulose
2016-06-17 16:48 ` James Morse
2016-06-21 18:07 ` Will Deacon
2016-06-17 16:37 ` Geoff Levand
2016-06-17 16:39 ` Suzuki K Poulose [this message]
2016-06-17 16:42 ` Mark Rutland
2016-06-17 9:34 ` [PATCH 2/2] arm64: hibernate: Don't hibernate on systems with stuck CPUs James Morse
2016-06-17 10:28 ` 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=576427DB.6020600@arm.com \
--to=suzuki.poulose@arm.com \
--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).