mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 00:11:13 +00:00
34 lines
858 B
Diff
34 lines
858 B
Diff
|
From 55974977523c2c5089613549ea51c007d7a71b40 Mon Sep 17 00:00:00 2001
|
||
|
From: Dom Cobley <popcornmix@gmail.com>
|
||
|
Date: Thu, 16 Mar 2023 14:41:16 +0000
|
||
|
Subject: [PATCH] reboot: Use power off rather than busy spinning when
|
||
|
halt is requested
|
||
|
|
||
|
Busy spinning after halt is dumb
|
||
|
We've previously applied this patch to arch/arm
|
||
|
but it is currenltly missing in arch/arm64
|
||
|
|
||
|
Pi4 after "sudo halt" uses 520mA
|
||
|
Pi4 after "sudo shutdown now" uses 310mA
|
||
|
|
||
|
Make them both use the lower powered option
|
||
|
|
||
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
||
|
---
|
||
|
arch/arm64/kernel/process.c | 4 +---
|
||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||
|
|
||
|
--- a/arch/arm64/kernel/process.c
|
||
|
+++ b/arch/arm64/kernel/process.c
|
||
|
@@ -96,9 +96,7 @@ void machine_shutdown(void)
|
||
|
*/
|
||
|
void machine_halt(void)
|
||
|
{
|
||
|
- local_irq_disable();
|
||
|
- smp_send_stop();
|
||
|
- while (1);
|
||
|
+ machine_power_off();
|
||
|
}
|
||
|
|
||
|
/*
|