linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Vaibhav Jain <vaibhav@linux.ibm.com>,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org
Cc: "Paul E. McKenney" <paulmck@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	"Steven Rostedt \(Google\)" <rostedt@goodmis.org>,
	Nicholas Piggin <npiggin@gmail.com>,
	Vaibhav Jain <vaibhav@linux.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	Daniel Sneddon <daniel.sneddon@linux.intel.com>
Subject: Re: [PATCH v2] powerpc: Enable generic cpu idle-loop
Date: Fri, 20 Oct 2023 23:26:21 +1100	[thread overview]
Message-ID: <871qdp5vki.fsf@mail.lhotse> (raw)
In-Reply-To: <20230821045928.1350893-1-vaibhav@linux.ibm.com>

Hi Vaibhav,

Vaibhav Jain <vaibhav@linux.ibm.com> writes:
> This minor patch enables config option GENERIC_IDLE_POLL_SETUP for arch
> powerpc. This should add support for kernel param 'nohlt'.
>
> Powerpc kernel also supports another kernel boot-time param called
> 'powersave' which can also be used to disable all cpu idle-states and
> forces CPU to an idle-loop similar to what cpu_idle_poll() does. Hence this
> patch  also updates the handling of 'powersave=off' kernel param to enable
> generic cpu idle-loop if its enabled.
>
> Signed-off-by: Vaibhav Jain<vaibhav@linux.ibm.com>
> ---
> Changelog:
>
> Since v1:
> https://lore.kernel.org/all/20230818050739.827851-1-vaibhav@linux.ibm.com
> * Updated powersave_off() to enable generic cpu idle-loop if
> 'powersave=off' kernel arg is given. [Mpe]
> * Update patch description

I had already merged the v1 when I saw this, and ...

> diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
> index b1c0418b25c8..7367a0698459 100644
> --- a/arch/powerpc/kernel/idle.c
> +++ b/arch/powerpc/kernel/idle.c
> @@ -35,6 +36,8 @@ EXPORT_SYMBOL(cpuidle_disable);
>  
>  static int __init powersave_off(char *arg)
>  {
> +	/* Use generic idle loop if thats available */
> +	cpu_idle_poll_ctrl(true);
>  	ppc_md.power_save = NULL;
>  	cpuidle_disable = IDLE_POWERSAVE_OFF;
>  	return 1;

The hope here would be that we could remove the need for cpuidle_disable.

cheers

      reply	other threads:[~2023-10-20 12:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21  4:59 [PATCH v2] powerpc: Enable generic cpu idle-loop Vaibhav Jain
2023-10-20 12:26 ` Michael Ellerman [this message]

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=871qdp5vki.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=daniel.sneddon@linux.intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rdunlap@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=vaibhav@linux.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).