Refresh patches Signed-off-by: Joshua Covington <joshuacov@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23703 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
50 lines
1.2 KiB
Diff
50 lines
1.2 KiB
Diff
From 9f6ded872ba25670240f97c4b01ea015469f9f5b Mon Sep 17 00:00:00 2001
|
|
From: popcornmix <popcornmix@gmail.com>
|
|
Date: Tue, 5 Apr 2016 19:40:12 +0100
|
|
Subject: [PATCH] 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
|
|
@@ -99,9 +99,7 @@ void machine_shutdown(void)
|
|
*/
|
|
void machine_halt(void)
|
|
{
|
|
- local_irq_disable();
|
|
- smp_send_stop();
|
|
- while (1);
|
|
+ machine_power_off();
|
|
}
|
|
|
|
/*
|