Skip to content

Commit 86fe639

Browse files
Christoph Hellwigpaul-walmsley-sifive
authored andcommitted
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 <[email protected]> Reviewed-by: Anup Patel <[email protected]> Reviewed-by: Atish Patra <[email protected]> [[email protected]: split the WFI fix apart from the nommu-related default_power_off() changes] Signed-off-by: Paul Walmsley <[email protected]>
1 parent a99d808 commit 86fe639

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/riscv/kernel/reset.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
static void default_power_off(void)
1111
{
1212
sbi_shutdown();
13-
while (1);
13+
while (1)
14+
wait_for_interrupt();
1415
}
1516

1617
void (*pm_power_off)(void) = default_power_off;

0 commit comments

Comments
 (0)