reboot: Use power off rather than busy spinning when halt is requested
authorpopcornmix <popcornmix@gmail.com>
Tue, 5 Apr 2016 18:40:12 +0000 (19:40 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:31:32 +0000 (11:31 +0000)
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/arm/kernel/reboot.c
arch/arm64/kernel/process.c

index 3f0d5c3..cfdbcc9 100644 (file)
@@ -102,9 +102,7 @@ void machine_shutdown(void)
  */
 void machine_halt(void)
 {
-       local_irq_disable();
-       smp_send_stop();
-       while (1);
+       machine_power_off();
 }
 
 /*
index 0fcc4eb..8af7214 100644 (file)
@@ -96,9 +96,7 @@ void machine_shutdown(void)
  */
 void machine_halt(void)
 {
-       local_irq_disable();
-       smp_send_stop();
-       while (1);
+       machine_power_off();
 }
 
 /*