[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.9999.1910311348350.25874@viisi.sifive.com>
Date: Thu, 31 Oct 2019 13:49:47 -0700 (PDT)
From: Paul Walmsley <paul.walmsley@...ive.com>
To: Christoph Hellwig <hch@....de>
cc: Palmer Dabbelt <palmer@...ive.com>,
Damien Le Moal <damien.lemoal@....com>,
linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org,
Anup Patel <anup@...infault.org>,
Atish Patra <atish.patra@....com>
Subject: Re: [PATCH 04/12] riscv: cleanup the default power off
implementation
On Mon, 28 Oct 2019, Christoph Hellwig wrote:
> Move the sbi poweroff to a separate function and file that is only
> compiled if CONFIG_SBI is set. Provide a new default fallback
> power off that just sits in a wfi loop to save some power.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
> Reviewed-by: Anup Patel <anup@...infault.org>
> Reviewed-by: Atish Patra <atish.patra@....com>
Thanks, I've split the WFI optimization out into a separate patch (below)
and queued it for v5.5-rc1.
- Paul
From: Christoph Hellwig <hch@....de>
Date: Wed, 30 Oct 2019 16:11:47 -0700
Subject: [PATCH] riscv: enter WFI in default_power_off() if SBI does not
shutdown
Provide a new default fallback power off that just sits in a wfi loop
to save some power.
Signed-off-by: Christoph Hellwig <hch@....de>
Reviewed-by: Anup Patel <anup@...infault.org>
Reviewed-by: Atish Patra <atish.patra@....com>
[paul.walmsley@...ive.com: split the WFI improvement apart from the
nommu-related default_power_off() changes; wrote commit summary]
Signed-off-by: Paul Walmsley <paul.walmsley@...ive.com>
---
arch/riscv/kernel/reset.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c
index aa56bb135ec4..485be426d9b1 100644
--- a/arch/riscv/kernel/reset.c
+++ b/arch/riscv/kernel/reset.c
@@ -10,7 +10,8 @@
static void default_power_off(void)
{
sbi_shutdown();
- while (1);
+ while (1)
+ wait_for_interrupt();
}
void (*pm_power_off)(void) = default_power_off;
--
2.24.0.rc0
Powered by blists - more mailing lists