ac774db5b2a8ff722bc36ad8d0ad9669287e32d3
[openwrt/staging/blocktrron.git] /
1 From 55974977523c2c5089613549ea51c007d7a71b40 Mon Sep 17 00:00:00 2001
2 From: Dom Cobley <popcornmix@gmail.com>
3 Date: Thu, 16 Mar 2023 14:41:16 +0000
4 Subject: [PATCH] reboot: Use power off rather than busy spinning when
5 halt is requested
6
7 Busy spinning after halt is dumb
8 We've previously applied this patch to arch/arm
9 but it is currenltly missing in arch/arm64
10
11 Pi4 after "sudo halt" uses 520mA
12 Pi4 after "sudo shutdown now" uses 310mA
13
14 Make them both use the lower powered option
15
16 Signed-off-by: Dom Cobley <popcornmix@gmail.com>
17 ---
18 arch/arm64/kernel/process.c | 4 +---
19 1 file changed, 1 insertion(+), 3 deletions(-)
20
21 --- a/arch/arm64/kernel/process.c
22 +++ b/arch/arm64/kernel/process.c
23 @@ -96,9 +96,7 @@ void machine_shutdown(void)
24 */
25 void machine_halt(void)
26 {
27 - local_irq_disable();
28 - smp_send_stop();
29 - while (1);
30 + machine_power_off();
31 }
32
33 /*