From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Date: Thu, 02 Oct 2014 09:45:40 +0000 Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain Message-Id: <542D1EC4.10100@citrix.com> List-Id: References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> <1412100056-15517-15-git-send-email-linux@roeck-us.net> In-Reply-To: <1412100056-15517-15-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On 30/09/14 19:00, Guenter Roeck wrote: > The kernel core now supports a poweroff handler call chain > to remove power from the system. Call it if pm_power_off > is set to NULL. > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Signed-off-by: Guenter Roeck > --- > arch/x86/xen/enlighten.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index c0cb11f..645d00f 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1322,6 +1322,8 @@ static void xen_machine_power_off(void) > { > if (pm_power_off) > pm_power_off(); > + else > + do_kernel_poweroff(); Why isn't this if (pm_power_off) check in do_kernel_poweroff()? That way when you finally remove pm_power_off you need only update one place. A quick skim of the other archs suggest this would work for them too. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain Date: Thu, 2 Oct 2014 10:45:40 +0100 Message-ID: <542D1EC4.10100@citrix.com> References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> <1412100056-15517-15-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412100056-15517-15-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> Sender: linux-metag-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Guenter Roeck , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, linux-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-c6x-dev-jPsnJVOj+W6hPH1hqNUYSQ@public.gmane.org, linux-parisc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-pm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org, Boris Ostrovsky , linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org On 30/09/14 19:00, Guenter Roeck wrote: > The kernel core now supports a poweroff handler call chain > to remove power from the system. Call it if pm_power_off > is set to NULL. > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Signed-off-by: Guenter Roeck > --- > arch/x86/xen/enlighten.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index c0cb11f..645d00f 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1322,6 +1322,8 @@ static void xen_machine_power_off(void) > { > if (pm_power_off) > pm_power_off(); > + else > + do_kernel_poweroff(); Why isn't this if (pm_power_off) check in do_kernel_poweroff()? That way when you finally remove pm_power_off you need only update one place. A quick skim of the other archs suggest this would work for them too. David -- To unsubscribe from this list: send the line "unsubscribe linux-metag" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 02 Oct 2014 11:45:51 +0200 (CEST) Received: from smtp02.citrix.com ([66.165.176.63]:56174 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27009620AbaJBJptJxLyO (ORCPT ); Thu, 2 Oct 2014 11:45:49 +0200 X-IronPort-AV: E=Sophos;i="5.04,638,1406592000"; d="scan'208";a="178466624" Message-ID: <542D1EC4.10100@citrix.com> Date: Thu, 2 Oct 2014 10:45:40 +0100 From: David Vrabel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0 MIME-Version: 1.0 To: Guenter Roeck , CC: , , , , , , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , , Boris Ostrovsky , , Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> <1412100056-15517-15-git-send-email-linux@roeck-us.net> In-Reply-To: <1412100056-15517-15-git-send-email-linux@roeck-us.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-DLP: MIA1 Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 42928 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: david.vrabel@citrix.com Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On 30/09/14 19:00, Guenter Roeck wrote: > The kernel core now supports a poweroff handler call chain > to remove power from the system. Call it if pm_power_off > is set to NULL. > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Signed-off-by: Guenter Roeck > --- > arch/x86/xen/enlighten.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index c0cb11f..645d00f 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1322,6 +1322,8 @@ static void xen_machine_power_off(void) > { > if (pm_power_off) > pm_power_off(); > + else > + do_kernel_poweroff(); Why isn't this if (pm_power_off) check in do_kernel_poweroff()? That way when you finally remove pm_power_off you need only update one place. A quick skim of the other archs suggest this would work for them too. David From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp02.citrix.com ([66.165.176.63]:56174 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S27009620AbaJBJptJxLyO (ORCPT ); Thu, 2 Oct 2014 11:45:49 +0200 Message-ID: <542D1EC4.10100@citrix.com> Date: Thu, 2 Oct 2014 10:45:40 +0100 From: David Vrabel MIME-Version: 1.0 Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> <1412100056-15517-15-git-send-email-linux@roeck-us.net> In-Reply-To: <1412100056-15517-15-git-send-email-linux@roeck-us.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-Path: Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-subscribe: List-owner: List-post: List-archive: To: Guenter Roeck , linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org, linux-c6x-dev@linux-c6x.org, linux-parisc@vger.kernel.org, linux-pm@vger.kernel.org, linux-sh@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , xen-devel@lists.xenproject.org, Boris Ostrovsky , linux-metag@vger.kernel.org, linux-arm-kernel@lists.infradead.org Message-ID: <20141002094540.HAvpPtwTwEkOmixVjop43Uk56gobQGyFTqB6Hzkk1QY@z> On 30/09/14 19:00, Guenter Roeck wrote: > The kernel core now supports a poweroff handler call chain > to remove power from the system. Call it if pm_power_off > is set to NULL. > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Signed-off-by: Guenter Roeck > --- > arch/x86/xen/enlighten.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index c0cb11f..645d00f 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1322,6 +1322,8 @@ static void xen_machine_power_off(void) > { > if (pm_power_off) > pm_power_off(); > + else > + do_kernel_poweroff(); Why isn't this if (pm_power_off) check in do_kernel_poweroff()? That way when you finally remove pm_power_off you need only update one place. A quick skim of the other archs suggest this would work for them too. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain Date: Thu, 2 Oct 2014 10:45:40 +0100 Message-ID: <542D1EC4.10100@citrix.com> References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> <1412100056-15517-15-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Cc: , , , , , , Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , , Boris Ostrovsky , , To: Guenter Roeck , Return-path: In-Reply-To: <1412100056-15517-15-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> List-ID: List-Id: linux-parisc.vger.kernel.org On 30/09/14 19:00, Guenter Roeck wrote: > The kernel core now supports a poweroff handler call chain > to remove power from the system. Call it if pm_power_off > is set to NULL. > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Signed-off-by: Guenter Roeck > --- > arch/x86/xen/enlighten.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index c0cb11f..645d00f 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1322,6 +1322,8 @@ static void xen_machine_power_off(void) > { > if (pm_power_off) > pm_power_off(); > + else > + do_kernel_poweroff(); Why isn't this if (pm_power_off) check in do_kernel_poweroff()? That way when you finally remove pm_power_off you need only update one place. A quick skim of the other archs suggest this would work for them too. David -- To unsubscribe from this list: send the line "unsubscribe linux-metag" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: david.vrabel@citrix.com (David Vrabel) Date: Thu, 2 Oct 2014 10:45:40 +0100 Subject: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain In-Reply-To: <1412100056-15517-15-git-send-email-linux@roeck-us.net> References: <1412100056-15517-1-git-send-email-linux@roeck-us.net> <1412100056-15517-15-git-send-email-linux@roeck-us.net> Message-ID: <542D1EC4.10100@citrix.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 30/09/14 19:00, Guenter Roeck wrote: > The kernel core now supports a poweroff handler call chain > to remove power from the system. Call it if pm_power_off > is set to NULL. > > Cc: Konrad Rzeszutek Wilk > Cc: Boris Ostrovsky > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: H. Peter Anvin > Signed-off-by: Guenter Roeck > --- > arch/x86/xen/enlighten.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c > index c0cb11f..645d00f 100644 > --- a/arch/x86/xen/enlighten.c > +++ b/arch/x86/xen/enlighten.c > @@ -1322,6 +1322,8 @@ static void xen_machine_power_off(void) > { > if (pm_power_off) > pm_power_off(); > + else > + do_kernel_poweroff(); Why isn't this if (pm_power_off) check in do_kernel_poweroff()? That way when you finally remove pm_power_off you need only update one place. A quick skim of the other archs suggest this would work for them too. David