mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
8c405cdccc
The patches were generated from the RPi repo with the following command: git format-patch v6.6.34..rpi-6.1.y Some patches needed rebasing and, as usual, the applied and reverted, wireless drivers, Github workflows, READMEs and defconfigs patches were removed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
50 lines
1.2 KiB
Diff
50 lines
1.2 KiB
Diff
From 7b4fcaaaf4d7081c4c1be24b4961f59e14e2af6c Mon Sep 17 00:00:00 2001
|
|
From: popcornmix <popcornmix@gmail.com>
|
|
Date: Tue, 5 Apr 2016 19:40:12 +0100
|
|
Subject: [PATCH 0074/1085] reboot: Use power off rather than busy spinning
|
|
when halt is requested
|
|
|
|
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 | 4 +---
|
|
arch/arm64/kernel/process.c | 4 +---
|
|
2 files changed, 2 insertions(+), 6 deletions(-)
|
|
|
|
--- a/arch/arm/kernel/reboot.c
|
|
+++ b/arch/arm/kernel/reboot.c
|
|
@@ -102,9 +102,7 @@ void machine_shutdown(void)
|
|
*/
|
|
void machine_halt(void)
|
|
{
|
|
- local_irq_disable();
|
|
- smp_send_stop();
|
|
- while (1);
|
|
+ machine_power_off();
|
|
}
|
|
|
|
/*
|
|
--- 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();
|
|
}
|
|
|
|
/*
|