From: Will Deacon <will@kernel.org>
To: Sudeep Holla <sudeep.holla@kernel.org>
Cc: Yureka Lilian <yureka@cyberchaos.dev>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] arch: arm64: add early_param idle=<wfi|yield|nop>
Date: Mon, 13 Jul 2026 12:59:31 +0100 [thread overview]
Message-ID: <alTTIx_aw3L0ibqN@willie-the-truck> (raw)
In-Reply-To: <20260713-bulky-thistle-leopard-c66a18@sudeepholla>
On Mon, Jul 13, 2026 at 10:57:38AM +0100, Sudeep Holla wrote:
> On Sat, Jul 11, 2026 at 09:35:25AM +0200, Yureka Lilian wrote:
> > Overriding the idle mechanism might be useful for debugging and performance
> > testing. Add a cmdline parameter for it, similar to the existing idle=
> > parameter already present for the x86 and ppc architectures.
> >
> > It is also useful on platforms where the WFI instruction misbehaves,
> > such as Apple Silicon SoCs. Generally, a misbehaving instruction should
> > be treated as an erratum and patched using the alternatives framework.
> > However, in the Apple Silicon case we need more flexibility because it is
> > difficult to detect whether the erratum applies. For example, Linux VMs
> > inside macOS have the same MIDR and may even seem like they're running
> > in EL2 in the case of NV, but should continue using WFI (it's trapped and
> > handled correctly by the hypervisor there). Thus, we prefer to
> > let the m1n1 bootloader add the idle=nop parameter[1].
> >
> > Link[1]: https://lore.kernel.org/all/99b69262-e54b-424e-baa2-96ef7013b87a@kernel.org/
> > Suggested-by: Will Deacon <will@kernel.org>
> > Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
> > ---
> > Changes in v2:
> > - Applied suggestions by Anshuman Khandual (Thanks!)
> > - Link to v1: https://patch.msgid.link/20260705-arm64-idle-param-v1-1-7454249f473f@cyberchaos.dev
> > ---
> > Documentation/admin-guide/kernel-parameters.txt | 23 +++++++++++++++++++
> > arch/arm64/kernel/idle.c | 30 +++++++++++++++++++++++--
> > arch/arm64/kernel/idle.h | 13 +++++++++++
> > arch/arm64/lib/delay.c | 5 ++++-
> > 4 files changed, 68 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> > index b2d7d3540ded..d7f5471edf8f 100644
> > --- a/Documentation/admin-guide/kernel-parameters.txt
> > +++ b/Documentation/admin-guide/kernel-parameters.txt
> > @@ -2239,6 +2239,29 @@ Kernel parameters
> >
> > idle=nomwait: Disable mwait for CPU C-states
> >
> > + [ARM64,EARLY]
> > + Format: idle=wfi, idle=yield, idle=nop
> > +
> > + idle=wfi: Use the WFI (Wait For Interrupt) hint
> > + instruction in the idle loop. This is the default and
> > + allows the CPU to enter a low-power state until an
> > + interrupt arrives.
>
> Just curious as when and why one would need to use idle=wfi if that is the
> default behaviour. I am missing the need to have it.
It's probably useful to have so that you can override an idle= option
present earlier in the cmdline. e.g.
idle=nop idle=wfi
will give you the wfi behaviour, which is handy if the cmdline is
stitched topgether from different sources.
Will
next prev parent reply other threads:[~2026-07-13 11:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-11 7:35 [PATCH v2] arch: arm64: add early_param idle=<wfi|yield|nop> Yureka Lilian
2026-07-13 9:57 ` Sudeep Holla
2026-07-13 11:59 ` Will Deacon [this message]
2026-07-13 15:26 ` Sudeep Holla
2026-07-13 12:24 ` Anshuman Khandual
2026-07-13 15:36 ` Sudeep Holla
2026-07-15 13:24 ` Yureka Lilian
2026-07-16 10:58 ` Sudeep Holla
2026-07-22 21:43 ` Will Deacon
2026-07-27 8:49 ` Yureka Lilian
2026-07-31 16:16 ` Will Deacon
2026-07-31 19:32 ` Yureka Lilian
2026-08-04 15:28 ` 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=alTTIx_aw3L0ibqN@willie-the-truck \
--to=will@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=sudeep.holla@kernel.org \
--cc=yureka@cyberchaos.dev \
/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