All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain
Date: Thu, 02 Oct 2014 13:27:08 +0000	[thread overview]
Message-ID: <542D52AC.3040009@roeck-us.net> (raw)
In-Reply-To: <542D1EC4.10100@citrix.com>

On 10/02/2014 02:45 AM, David Vrabel wrote:
> 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 <konrad.wilk@oracle.com>
>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: H. Peter Anvin <hpa@zytor.com>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   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.
>

Good idea. I'll do that for the next version of the patch set.

Guenter



WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
To: David Vrabel
	<david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
	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 <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org,
	Boris Ostrovsky
	<boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>,
	linux-metag-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain
Date: Thu, 02 Oct 2014 06:27:08 -0700	[thread overview]
Message-ID: <542D52AC.3040009@roeck-us.net> (raw)
In-Reply-To: <542D1EC4.10100-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>

On 10/02/2014 02:45 AM, David Vrabel wrote:
> 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 <konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>> Cc: Boris Ostrovsky <boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
>> Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
>> Cc: Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> Cc: H. Peter Anvin <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
>> ---
>>   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.
>

Good idea. I'll do that for the next version of the patch set.

Guenter


--
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

WARNING: multiple messages have this Message-ID (diff)
From: Guenter Roeck <linux@roeck-us.net>
To: David Vrabel <david.vrabel@citrix.com>, 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 <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	xen-devel@lists.xenproject.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	linux-metag@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain
Date: Thu, 02 Oct 2014 06:27:08 -0700	[thread overview]
Message-ID: <542D52AC.3040009@roeck-us.net> (raw)
In-Reply-To: <542D1EC4.10100@citrix.com>

On 10/02/2014 02:45 AM, David Vrabel wrote:
> 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 <konrad.wilk@oracle.com>
>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: H. Peter Anvin <hpa@zytor.com>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   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.
>

Good idea. I'll do that for the next version of the patch set.

Guenter

WARNING: multiple messages have this Message-ID (diff)
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [Xen-devel] [RFC PATCH 14/16] x86/xen: support poweroff through poweroff handler call chain
Date: Thu, 02 Oct 2014 06:27:08 -0700	[thread overview]
Message-ID: <542D52AC.3040009@roeck-us.net> (raw)
In-Reply-To: <542D1EC4.10100@citrix.com>

On 10/02/2014 02:45 AM, David Vrabel wrote:
> 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 <konrad.wilk@oracle.com>
>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Cc: Thomas Gleixner <tglx@linutronix.de>
>> Cc: Ingo Molnar <mingo@redhat.com>
>> Cc: H. Peter Anvin <hpa@zytor.com>
>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>> ---
>>   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.
>

Good idea. I'll do that for the next version of the patch set.

Guenter

  parent reply	other threads:[~2014-10-02 13:27 UTC|newest]

Thread overview: 109+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 18:00 [RFC PATCH 00/16] kernel: Add support for poweroff handler call chain Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 01/16] " Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 02/16] hwmon: (ab8500) Call kernel_power_off instead of pm_power_off Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 03/16] parisc: support poweroff through poweroff handler call chain Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 04/16] arm: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 05/16] arm64: " Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-10-03 10:30   ` Catalin Marinas
2014-10-03 10:30     ` Catalin Marinas
2014-10-03 10:30     ` Catalin Marinas
2014-10-03 13:12     ` Guenter Roeck
2014-10-03 13:12     ` Guenter Roeck
2014-10-03 13:12       ` Guenter Roeck
2014-10-03 13:12       ` Guenter Roeck
2014-10-03 10:30   ` Catalin Marinas
2014-09-30 18:00 ` [RFC PATCH 06/16] avr32: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 07/16] c6x: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-10-03 15:17   ` Mark Salter
2014-10-03 15:17     ` Mark Salter
2014-10-03 15:17     ` Mark Salter
2014-10-03 15:17   ` Mark Salter
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 08/16] ia64: " Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 09/16] metag: " Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 10/16] mips: " Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-10-01 13:32   ` Ralf Baechle
2014-10-01 13:32   ` Ralf Baechle
2014-10-01 13:32     ` Ralf Baechle
2014-10-01 13:32     ` Ralf Baechle
2014-10-01 16:26     ` Guenter Roeck
2014-10-01 16:26     ` Guenter Roeck
2014-10-01 16:26       ` Guenter Roeck
2014-10-01 16:26       ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 11/16] sh: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 12/16] unicore32: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 13/16] x86: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 14/16] x86/xen: " Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-10-02  9:45   ` David Vrabel
2014-10-02  9:45   ` [Xen-devel] " David Vrabel
2014-10-02  9:45     ` David Vrabel
2014-10-02  9:45     ` David Vrabel
2014-10-02  9:45     ` David Vrabel
2014-10-02  9:45     ` David Vrabel
2014-10-02  9:45     ` David Vrabel
2014-10-02 13:27     ` Guenter Roeck
2014-10-02 13:27     ` Guenter Roeck [this message]
2014-10-02 13:27       ` [Xen-devel] " Guenter Roeck
2014-10-02 13:27       ` Guenter Roeck
2014-10-02 13:27       ` Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 15/16] power/reset: restart-poweroff: Register with kernel poweroff handler Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-10-03 14:27   ` Sebastian Reichel
2014-10-03 14:27     ` Sebastian Reichel
2014-10-03 14:27     ` Sebastian Reichel
2014-10-03 14:27   ` Sebastian Reichel
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00 ` [RFC PATCH 16/16] mfd: palmas: " Guenter Roeck
2014-09-30 18:00 ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck
2014-09-30 18:00   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542D52AC.3040009@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.