From: Sudeep Holla <sudeep.holla@arm.com>
To: Yuanjie Yang <quic_yuanjiey@quicinc.com>, Jacky Bai <ping.bai@nxp.com>
Cc: lpieralisi@kernel.org, rafael@kernel.org,
daniel.lezcano@linaro.org, james.morse@arm.com, d-gole@ti.com,
linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
khilman@baylibre.com, quic_tingweiz@quicinc.com
Subject: Re: [PATCH v2] cpuidle: psci: Init cpuidle only for present CPUs
Date: Wed, 5 Mar 2025 10:25:42 +0000 [thread overview]
Message-ID: <20250305102542.36q7lmctx5jm4mg7@bogus> (raw)
In-Reply-To: <Z8fv3X0Pivh8zbMg@cse-cd02-lnx.ap.qualcomm.com>
Hi Jacky,
I wasn't Cc-ed on the original patch.
I was searching to provide feedback but couldn't find one.
On Wed, Mar 05, 2025 at 02:31:57PM +0800, Yuanjie Yang wrote:
> On Wed, Nov 20, 2024 at 06:37:49PM +0800, Jacky Bai wrote:
> > With 'nosmp' or 'maxcpus=0' boot command line parameters,
> > the 'cpu_present_mask' may not be the same as 'cpu_possible_mask'.
> >
> > In current psci cpuidle driver init, for_each_possible_cpu()
> > is used to init the cpuidle for each possible CPU. but in
> > drivers/base/cpu.c ->cpu_dev_register_generic(),
> > for_each_present_cpu() is used to register cpu device for
> > present CPUs.
> >
> > When boot system with 'nosmp' or 'maxcpus=0', the cpuidle driver
> > init failed due to no valid CPU device sysfs node for non-boot CPUs.
> >
> > [ 0.182993] Failed to register cpuidle device for cpu1
> >
> > Use for_each_present_cpu() to register cpuidle only for present
> > CPUs.
> >
Can you reword it something like
"
for_each_possible_cpu() is currently used to initialize cpuidle in the
PSCI cpuidle driver.
However, in cpu_dev_register_generic(), for_each_present_cpu() is used
to register CPU devices which means the CPU devices are only registered
for present CPUs and not all possible CPUs.
With nosmp or maxcpus=0, only the boot CPU is present, leading to the
failure:
| Failed to register cpuidle device for cpu1
Change for_each_possible_cpu() to for_each_present_cpu() in the PSCI
cpuidle driver to ensure it only registers cpuidle devices for CPUs
that are actually present.
"
With that, you can add:
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Please cc Ulf Hansson <ulf.hansson@linaro.org> as well. Either him or
Rafael can then pick up the patch.
--
Regards,
Sudeep
next prev parent reply other threads:[~2025-03-05 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-20 10:37 Jacky Bai
2025-03-05 6:31 ` Yuanjie Yang
2025-03-05 10:25 ` Sudeep Holla [this message]
2025-03-05 10:29 ` Jacky Bai
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=20250305102542.36q7lmctx5jm4mg7@bogus \
--to=sudeep.holla@arm.com \
--cc=d-gole@ti.com \
--cc=daniel.lezcano@linaro.org \
--cc=imx@lists.linux.dev \
--cc=james.morse@arm.com \
--cc=khilman@baylibre.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=ping.bai@nxp.com \
--cc=quic_tingweiz@quicinc.com \
--cc=quic_yuanjiey@quicinc.com \
--cc=rafael@kernel.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
all inboxes | Powered by JetHome®