Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Yureka Lilian <yureka@cyberchaos.dev>
Cc: 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: Wed, 22 Jul 2026 22:43:09 +0100	[thread overview]
Message-ID: <amE5bX0jey6WS0U1@willie-the-truck> (raw)
In-Reply-To: <20260711-arm64-idle-param-v2-1-0ab67652a435@cyberchaos.dev>

On Sat, Jul 11, 2026 at 09:35:25AM +0200, Yureka Lilian wrote:
> diff --git a/arch/arm64/lib/delay.c b/arch/arm64/lib/delay.c
> index e278e060e78a..2452990ed37a 100644
> --- a/arch/arm64/lib/delay.c
> +++ b/arch/arm64/lib/delay.c
> @@ -15,6 +15,8 @@
>  
>  #include <clocksource/arm_arch_timer.h>
>  
> +#include "../kernel/idle.h"
> +
>  #define USECS_TO_CYCLES(time_usecs)			\
>  	xloops_to_cycles((time_usecs) * 0x10C7UL)
>  
> @@ -49,7 +51,8 @@ void __delay(unsigned long cycles)
>  		 * Start with WFIT. If an interrupt makes us resume
>  		 * early, use a WFET loop to complete the delay.
>  		 */
> -		wfit(end);
> +		if (likely(idle == ARM64_IDLE_WFI))
> +			wfit(end);

Rather than scatter the idle implementation check across all users of
WFI*, why not move this into the macro itself? That way, the callers can
all stay like they are but the macro behaves as specified.

Will


  parent reply	other threads:[~2026-07-22 21:43 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
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 [this message]
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=amE5bX0jey6WS0U1@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=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