diff options
author | Christoph Hellwig <hch@lst.de> | 2019-10-30 16:11:47 -0700 |
---|---|---|
committer | Paul Walmsley <paul.walmsley@sifive.com> | 2019-11-05 09:11:17 -0800 |
commit | 86fe639a1c1678d81fc4c82a39a5299df6deb944 (patch) | |
tree | 6b90645ac94b8dbf8a2557dcc1321f39170bb437 /arch/riscv | |
parent | a99d8080aaf358d5d23581244e5da23b35e340b9 (diff) | |
download | linux-86fe639a1c1678d81fc4c82a39a5299df6deb944.tar.bz2 |
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@lst.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
[paul.walmsley@sifive.com: split the WFI fix apart from the
nommu-related default_power_off() changes]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Diffstat (limited to 'arch/riscv')
-rw-r--r-- | arch/riscv/kernel/reset.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |