From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00163C43458 for ; Mon, 13 Jul 2026 15:26:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KWkHqistC4QCWTdZeY/UMz9VShi6CbU4xhDCXtjbcEY=; b=3WbktPh3INz8Ez0Mv7skVEAZRP B70SP7x/QoG460s3Vq3jtd1ZVzMbUm0sEn+hrnEvqTZdfkDj0SUGDYLlZBaiNVW16bwoPZSqbdTzj pYGboKI1xWo20M8mooyIghxJmCzc9mR2rV4zlSMhDk2dz4MgVEBdS2ccLLBS9MYIqoUQFe5tbEre6 gXsrDESptm+jVGhTn5dm0nVXOdQYFO3sa4ULfg1XqnqJAQuNNK7sjCvRAYKE1AIqs2eSG5i64ZGgc QxTxrS+QBTmjKVqWxGIKjjeqphMyb0AtlOASzaMVDHDpUY1r4AwMaIYFKJm4Xj5hixqEYOQd+xXRd nSQZFPcA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wjIY8-00000009mmc-3ihn; Mon, 13 Jul 2026 15:26:28 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wjIY8-00000009mmL-00kI for linux-arm-kernel@lists.infradead.org; Mon, 13 Jul 2026 15:26:28 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 997D24165D; Mon, 13 Jul 2026 15:26:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5BE41F000E9; Mon, 13 Jul 2026 15:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783956387; bh=KWkHqistC4QCWTdZeY/UMz9VShi6CbU4xhDCXtjbcEY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Dl+on/vTDIen4WlPhOmtx9HaeEmfcrQUK6ZlEhwv5eX/PU2G078DnL50UgJ0d/iIW YSsaF3Z/OCdvEq3bOZTQ+1Vibaw5w7nj5RMwV7+gX83ux1tc8VjuHIGfO5LevHhy7v ueaI/zuWuZRVeuY8z+MZ7rfgbNLcevFvDvIg3KXhPtyHG19/LQty/eHoRYedEuGsTv 78V3FsWZI9+nKBS0BNqPQ4Bh59ASNyq9hGfnfUSWM5Bi3wpIXP1gWbARM9V+1rEwnG 886tSTYDoIkJE3921W1eMuYRjN4UD1Mey9qLdklZ1UgYW5eWhJOn+g2DnGZVxvjFE8 77HfXaWHhF3ow== Date: Mon, 13 Jul 2026 16:26:23 +0100 From: Sudeep Holla To: Will Deacon Cc: Yureka Lilian , Jonathan Corbet , Shuah Khan , Catalin Marinas , Sudeep Holla , Anshuman Khandual , 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= Message-ID: <20260713-silky-imperial-kangaroo-a7df94@sudeepholla> References: <20260711-arm64-idle-param-v2-1-0ab67652a435@cyberchaos.dev> <20260713-bulky-thistle-leopard-c66a18@sudeepholla> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 13, 2026 at 12:59:31PM +0100, Will Deacon wrote: > 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 > > > Signed-off-by: Yureka Lilian > > > --- > > > 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. > Thanks, that makes sense. -- Regards, Sudeep