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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <29b9f4f7e2b28a6131e174f61c528bca98030a95.camel@wdc.com>
Date:   Mon, 1 Jul 2019 21:07:40 +0000
From:   Atish Patra <Atish.Patra@....com>
To:     "hch@....de" <hch@....de>,
        "paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
        "palmer@...ive.com" <palmer@...ive.com>
CC:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Damien Le Moal <Damien.LeMoal@....com>,
        "linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/17] riscv: improve the default power off implementation

On Mon, 2019-06-24 at 07:43 +0200, Christoph Hellwig wrote:
> Only call the SBI code if we are not running in M mode, and if we
> didn't
> do the SBI call, or it didn't succeed call wfi in a loop to at least
> save some power.
> 
> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  arch/riscv/kernel/reset.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c
> index d0fe623bfb8f..2f5ca379747e 100644
> --- a/arch/riscv/kernel/reset.c
> +++ b/arch/riscv/kernel/reset.c
> @@ -8,8 +8,11 @@
>  
>  static void default_power_off(void)
>  {
> +#ifndef CONFIG_M_MODE
>  	sbi_shutdown();
> -	while (1);
> +#endif
> +	while (1)
> +		wait_for_interrupt();
>  }
>  
>  void (*pm_power_off)(void) = default_power_off;

Reviewed-by: Atish Patra <atish.patra@....com>

Regards,
Atish

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ