[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 18/45] riscv: Use do_kernel_power_off()
- To: digetx@xxxxxxxxx
- From: Palmer Dabbelt <palmer@xxxxxxxxxxx>
- Date: Wed, 27 Oct 2021 16:09:07 -0700 (PDT)
- Cc: thierry.reding@xxxxxxxxx, jonathanh@xxxxxxxxxx, lee.jones@xxxxxxxxxx, rafael@xxxxxxxxxx, broonie@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, linux@xxxxxxxxxxxx, linux@xxxxxxxxxxxxxxx, daniel.lezcano@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, ulf.hansson@xxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx, guoren@xxxxxxxxxx, geert@xxxxxxxxxxxxxx, gerg@xxxxxxxxxxxxxx, funaho@xxxxxxxxx, tsbogend@xxxxxxxxxxxxxxxx, nickhu@xxxxxxxxxxxxx, green.hu@xxxxxxxxx, deanbo422@xxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, deller@xxxxxx, mpe@xxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, Paul Walmsley <paul.walmsley@xxxxxxxxxx>, aou@xxxxxxxxxxxxxxxxx, ysato@xxxxxxxxxxxxxxxxxxxx, dalias@xxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, hpa@xxxxxxxxx, boris.ostrovsky@xxxxxxxxxx, jgross@xxxxxxxx, sstabellini@xxxxxxxxxx, lenb@xxxxxxxxxx, ssantosh@xxxxxxxxxx, krzysztof.kozlowski@xxxxxxxxxxxxx, linus.walleij@xxxxxxxxxx, wens@xxxxxxxx, j.neuschaefer@xxxxxxx, tony@xxxxxxxxxxx, lgirdwood@xxxxxxxxx, p.zabel@xxxxxxxxxxxxxx, vz@xxxxxxxxx, avifishman70@xxxxxxxxx, tmaimon77@xxxxxxxxx, tali.perry1@xxxxxxxxx, venture@xxxxxxxxxx, yuenn@xxxxxxxxxx, benjaminfair@xxxxxxxxxx, pavel@xxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx, linux-omap@xxxxxxxxxxxxxxx, openbmc@xxxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 28 Oct 2021 04:23:00 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, 27 Oct 2021 14:16:48 PDT (-0700), digetx@xxxxxxxxx wrote:
Kernel now supports chained power-off handlers. Use do_kernel_power_off()
that invokes chained power-off handlers. It also invokes legacy
pm_power_off() for now, which will be removed once all drivers will
be converted to the new power-off API.
Signed-off-by: Dmitry Osipenko <digetx@xxxxxxxxx>
---
arch/riscv/kernel/reset.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/riscv/kernel/reset.c b/arch/riscv/kernel/reset.c
index 9c842c41684a..912288572226 100644
--- a/arch/riscv/kernel/reset.c
+++ b/arch/riscv/kernel/reset.c
@@ -23,16 +23,12 @@ void machine_restart(char *cmd)
void machine_halt(void)
{
- if (pm_power_off != NULL)
- pm_power_off();
- else
- default_power_off();
+ do_kernel_power_off();
+ default_power_off();
}
void machine_power_off(void)
{
- if (pm_power_off != NULL)
- pm_power_off();
- else
- default_power_off();
+ do_kernel_power_off();
+ default_power_off();
}
Acked-by: Palmer Dabbelt <palmer@xxxxxxxxxxx>
|