From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bh-25.webhostbox.net (bh-25.webhostbox.net [208.91.199.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 474AA1A1A34 for ; Fri, 10 Oct 2014 00:35:31 +1100 (EST) Received: from mailnull by bh-25.webhostbox.net with sa-checked (Exim 4.82) (envelope-from ) id 1XcDsP-000wHO-IX for linuxppc-dev@lists.ozlabs.org; Thu, 09 Oct 2014 13:35:29 +0000 Message-ID: <54368A30.9070101@roeck-us.net> Date: Thu, 09 Oct 2014 06:14:24 -0700 From: Guenter Roeck MIME-Version: 1.0 To: Pavel Machek Subject: Re: [PATCH 08/44] kernel: Move pm_power_off to common code References: <1412659726-29957-1-git-send-email-linux@roeck-us.net> <1412659726-29957-9-git-send-email-linux@roeck-us.net> <20141009103847.GC6787@amd> In-Reply-To: <20141009103847.GC6787@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Cc: linux-m32r-ja@ml.linux-m32r.org, linux-mips@linux-mips.org, linux-efi@vger.kernel.org, linux-ia64@vger.kernel.org, Steven Miao , linux-xtensa@linux-xtensa.org, Boris Ostrovsky , Catalin Marinas , Will Deacon , David Howells , Max Filippov , Paul Mackerras , Ralf Baechle , "H. Peter Anvin" , Guan Xuetao , Thomas Gleixner , Lennox Wu , Hans-Christian Egtvedt , devel@driverdev.osuosl.org, linux-s390@vger.kernel.org, Jesper Nilsson , lguest@lists.ozlabs.org, Russell King , linux-c6x-dev@linux-c6x.org, Len Brown , "David S. Miller" , linux-hexagon@vger.kernel.org, Hirokazu Takata , linux-sh@vger.kernel.org, "James E.J. Bottomley" , linux-acpi@vger.kernel.org, Ingo Molnar , Geert Uytterhoeven , Mark Salter , xen-devel@lists.xenproject.org, Matt Turner , Chen Liqin , Jonas Bonn , Haavard Skinnemoen , devicetree@vger.kernel.org, James Hogan , user-mode-linux-devel@lists.sourceforge.net, linux-pm@vger.kernel.org, Aurelien Jacquiot , Heiko Carstens , Jeff Dike , adi-buildroot-devel@lists.sourceforge.net, Chris Metcalf , Konrad Rzeszutek Wilk , Mikael Starvik , Richard Weinberger , linux-m68k@lists.linux-m68k.org, linux-am33-list@redhat.com, Ivan Kokshaysky , linux-tegra@vger.kernel.org, openipmi-developer@lists.sourceforge.net, linux-metag@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Richard Henderson , Chris Zankel , Michal Simek , Tony Luck , linux-parisc@vger.kernel.org, linux-cris-kernel@axis.com, Vineet Gupta , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Fenghua Yu , Richard Kuo , David Vrabel , linux-alpha@vger.kernel.org, Martin Schwidefsky , Koichi Yasutake , linuxppc-dev@lists.ozlabs.org, Helge Deller List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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