Re: [PATCH v2] arch: arm64: add early_param idle=<wfi|yield|nop>

Will Deacon <[email protected]>
Newsgroups gmane.linux.documentation,gmane.linux.kernel,gmane.linux.ports.arm.kernel
Message-ID <anIFJJ3H-pHWhuL5@willie-the-truck>
On Fri, Jul 31, 2026 at 09:32:04PM +0200, Yureka Lilian wrote:
> On 7/31/26 18:16, Will Deacon wrote:
> > What do you think about a funny sort of hybrid approach where:
> > 
> >    * We have idle=, but it really only affects the idle loop
> >    * We have a cpu_errata entry to detect (based on the MIDR) this CPU
> >      and then avoid patching in the WFIT instructions (i.e. don't detect
> >      the ARM64_HAS_WFXT capability).
> > 
> > I think that would solve the case for you, as well as giving others finer
> > grained control over the idle implementation and adding the infrastructure
> > we need to handle a CPU with broken wfit.
> 
> The idle param portion, if implemented like you say only affecting the idle
> loop, should be rather uncontroversial.
> 
> Getting the other part of it (the WFIT in the delay function) right is much
> more difficult, but it also has less of an performance / efficiency impact
> if it's a bit on the conservative side and we can find a good solution
> independently of the idle param.

Thinking about this some more, why isn't the WFIT side handled with an
idreg override? If we extend the ID_AA64ISAR2_EL1 override entry in
arch/arm64/kernel/pi/idreg-override.c to include wfxt, then you can
nobble that on the cmdline as well.

Will
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.