[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH 08/44] kernel: Move pm_power_off to common code
- To: Pavel Machek <pavel@xxxxxxx>
- From: Guenter Roeck <linux@xxxxxxxxxxxx>
- Date: Thu, 09 Oct 2014 06:14:24 -0700
- Cc: linux-m32r-ja@xxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Steven Miao <realmz6@xxxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will.deacon@xxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Paul Mackerras <paulus@xxxxxxxxx>, Ralf Baechle <ralf@xxxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Lennox Wu <lennox.wu@xxxxxxxxx>, Hans-Christian Egtvedt <egtvedt@xxxxxxxxxxxx>, devel@xxxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, Jesper Nilsson <jesper.nilsson@xxxxxxxx>, lguest@xxxxxxxxxxxxxxxx, Russell King <linux@xxxxxxxxxxxxxxxx>, linux-c6x-dev@xxxxxxxxxxxxx, Len Brown <len.brown@xxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, linux-hexagon@xxxxxxxxxxxxxxx, Hirokazu Takata <takata@xxxxxxxxxxxxxx>, linux-sh@xxxxxxxxxxxxxxx, "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>, linux-acpi@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, Mark Salter <msalter@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Matt Turner <mattst88@xxxxxxxxx>, Chen Liqin <liqin.linux@xxxxxxxxx>, Jonas Bonn <jonas@xxxxxxxxxxxx>, Haavard Skinnemoen <hskinnemoen@xxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx, James Hogan <james.hogan@xxxxxxxxxx>, user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, Aurelien Jacquiot <a-jacquiot@xxxxxx>, Heiko Carstens <heiko.carstens@xxxxxxxxxx>, Jeff Dike <jdike@xxxxxxxxxxx>, adi-buildroot-devel@xxxxxxxxxxxxxxxxxxxxx, Chris Metcalf <cmetcalf@xxxxxxxxxx>, Mikael Starvik <starvik@xxxxxxxx>, Richard Weinberger <richard@xxxxxx>, linux-m68k@xxxxxxxxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx, Ivan Kokshaysky <ink@xxxxxxxxxxxxxxxxxxxx>, linux-tegra@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, linux-metag@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Richard Henderson <rth@xxxxxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx, Vineet Gupta <vgupta@xxxxxxxxxxxx>, "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Fenghua Yu <fenghua.yu@xxxxxxxxx>, Richard Kuo <rkuo@xxxxxxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>, David Vrabel <david.vrabel@xxxxxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, Martin Schwidefsky <schwidefsky@xxxxxxxxxx>, Koichi Yasutake <yasutake.koichi@xxxxxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx, Helge Deller <deller@xxxxxx>
- Delivery-date: Thu, 09 Oct 2014 13:34:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On 10/09/2014 03:38 AM, Pavel Machek wrote:
Hi!
@@ -184,6 +179,8 @@ machine_halt(void)
void
machine_power_off(void)
{
+ do_kernel_poweroff();
+
poweroff -> power_off for consistency.
Dunno; matter of personal preference. I started with that, but ultimately went
with poweroff to distinguish poweroff handler functions from existing code,
specifically kernel_power_off().
Does anyone else have an opinion ?
index c4f50a3..1da27d1 100644
--- a/arch/blackfin/kernel/reboot.c
+++ b/arch/blackfin/kernel/reboot.c
@@ -106,6 +107,7 @@ void machine_halt(void)
__attribute__((weak))
void native_machine_power_off(void)
{
+ do_kernel_poweroff();
idle_with_irq_disabled();
}
So here we handle do_kernel_poweroff() returning,
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index b78498e..eaafad0 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -60,6 +57,7 @@ void machine_halt(void)
void machine_power_off(void)
{
+ do_kernel_poweroff();
}
Here we don't.
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 5d40aeb77..a673725 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -107,6 +104,8 @@ void machine_power_off(void)
gdbstub_exit(0);
#endif
+ do_kernel_poweroff();
+
for (;;);
}
And here we do.
What is right?
Pavel
Up to the architecture maintainer to decide. My goal was to not change
existing behavior if no poweroff handler is registered.
Guenter
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|