lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <871qdp5vki.fsf@mail.lhotse>
Date:   Fri, 20 Oct 2023 23:26:21 +1100
From:   Michael Ellerman <mpe@...erman.id.au>
To:     Vaibhav Jain <vaibhav@...ux.ibm.com>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Cc:     Vaibhav Jain <vaibhav@...ux.ibm.com>,
        Jonathan Corbet <corbet@....net>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        Catalin Marinas <catalin.marinas@....com>,
        Randy Dunlap <rdunlap@...radead.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "Steven Rostedt (Google)" <rostedt@...dmis.org>,
        Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
        Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2] powerpc: Enable generic cpu idle-loop

Hi Vaibhav,

Vaibhav Jain <vaibhav@...ux.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@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ