Skip to content

Commit

Permalink
riscv: enter WFI in default_power_off() if SBI does not shutdown
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Paul Walmsley committed Nov 5, 2019
1 parent a99d808 commit 86fe639
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/riscv/kernel/reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 86fe639

Please sign in to comment.