From: Guenter Roeck <linux@roeck-us.net>
To: Pavel Machek <pavel@denx.de>
Cc: linux-kernel@vger.kernel.org,
adi-buildroot-devel@lists.sourceforge.net,
devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
lguest@lists.ozlabs.org, linux-acpi@vger.kernel.org,
linux-alpha@vger.kernel.org, linux-am33-list@redhat.com,
linux-cris-kernel@axis.com, linux-efi@vger.kernel.org,
linux-hexagon@vger.kernel.org, linux-m32r-ja@ml.linux-m32r.org,
linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org,
linux-tegra@vger.kernel.org, linux-xtensa@linux-xtensa.org,
openipmi-developer@lists.sourceforge.net,
user-mode-linux-devel@lists.sourceforge.net,
linux-arm-kernel@lists.infradead.org,
linux-c6x-dev@linux-c6x.org, linux-ia64@vger.kernel.org,
linux-m68k@lists.linux-m68k.org, linux-metag@vger.kernel.org,
linux-mips@linux-mips.org, linux-parisc@vger.kernel.orglinux-
Subject: Re: [PATCH 08/44] kernel: Move pm_power_off to common code
Date: Thu, 09 Oct 2014 06:14:24 -0700 [thread overview]
Message-ID: <54368A30.9070101@roeck-us.net> (raw)
In-Reply-To: <20141009103847.GC6787@amd>
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
next prev parent reply other threads:[~2014-10-09 13:14 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 5:28 [PATCH 00/44] kernel: Add support for poweroff handler call chain Guenter Roeck
2014-10-07 5:28 ` [PATCH 01/44] " Guenter Roeck
2014-10-07 7:46 ` Philippe Rétornaz
2014-10-09 10:31 ` Pavel Machek
2014-10-09 15:38 ` Guenter Roeck
2014-10-09 11:31 ` Geert Uytterhoeven
2014-10-09 13:25 ` Guenter Roeck
2015-06-18 1:04 ` Stephen Boyd
2015-06-18 6:53 ` Frans Klaver
[not found] ` <5582B15B.4010205@roeck-us.net>
2015-06-18 12:14 ` Frans Klaver
2015-06-18 15:30 ` Guenter Roeck
2015-06-18 21:40 ` Stephen Boyd
2014-10-07 5:28 ` [PATCH 02/44] memory: emif: Use API function to determine poweroff capability Guenter Roeck
2014-10-07 5:28 ` [PATCH 03/44] hibernate: Call have_kernel_poweroff instead of checking pm_power_off Guenter Roeck
2014-10-07 23:41 ` Rafael J. Wysocki
[not found] ` <20141009103254.GB6787@amd>
2014-10-09 13:24 ` Guenter Roeck
2014-10-07 5:28 ` [PATCH 04/44] m68k: Replace mach_power_off with pm_power_off Guenter Roeck
2014-10-07 8:29 ` Geert Uytterhoeven
2014-10-07 5:28 ` [PATCH 06/44] gpio-poweroff: Drop reference to pm_power_off from devicetree bindings Guenter Roeck
2014-10-07 11:03 ` Mark Rutland
2014-10-07 5:28 ` [PATCH 07/44] qnap-poweroff: " Guenter Roeck
2014-10-07 11:02 ` Mark Rutland
2014-10-07 15:57 ` Guenter Roeck
2014-10-07 15:51 ` Andrew Lunn
2014-10-07 5:28 ` [PATCH 08/44] kernel: Move pm_power_off to common code Guenter Roeck
2014-10-07 8:32 ` Geert Uytterhoeven
2014-10-07 13:58 ` Richard Weinberger
2014-10-07 23:42 ` Rafael J. Wysocki
2014-10-08 11:06 ` 回复: " Xuetao Guan
2014-10-09 10:38 ` Pavel Machek
2014-10-09 13:14 ` Guenter Roeck [this message]
2014-10-09 20:24 ` Pavel Machek
2014-10-10 16:53 ` Guenter Roeck
2014-10-14 4:29 ` Hirokazu TAKATA
2014-10-07 5:28 ` [PATCH 09/44] mfd: palmas: Register with kernel poweroff handler Guenter Roeck
2014-10-07 5:28 ` [PATCH 11/44] mfd: retu: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 12/44] mfd: ab8500-sysctrl: " Guenter Roeck
2014-10-07 8:00 ` Lee Jones
2014-10-09 10:36 ` Catalin Marinas
2014-10-09 10:49 ` Lee Jones
2014-10-09 13:26 ` Guenter Roeck
2014-10-09 13:33 ` Lee Jones
2014-10-09 15:45 ` Guenter Roeck
2014-10-07 5:28 ` [PATCH 14/44] mfd: tps80031: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 16/44] mfd: tps6586x: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 17/44] mfd: tps65910: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 18/44] mfd: twl4030-power: " Guenter Roeck
2014-10-07 7:52 ` Lee Jones
2014-10-07 5:28 ` [PATCH 19/44] ipmi: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 20/44] power/reset: restart-poweroff: " Guenter Roeck
2014-10-07 16:06 ` Andrew Lunn
2014-10-07 5:28 ` [PATCH 21/44] power/reset: gpio-poweroff: " Guenter Roeck
2014-10-07 16:00 ` Andrew Lunn
2014-10-07 5:28 ` [PATCH 22/44] power/reset: as3722-poweroff: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 23/44] power/reset: qnap-poweroff: " Guenter Roeck
2014-10-07 16:02 ` Andrew Lunn
2014-10-07 5:28 ` [PATCH 27/44] x86: apm: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 28/44] x86: olpc: Register xo1 poweroff handler " Guenter Roeck
2014-10-07 5:28 ` [PATCH 29/44] staging: nvec: Register " Guenter Roeck
2014-10-07 16:23 ` Greg Kroah-Hartman
2014-10-07 5:28 ` [PATCH 30/44] acpi: Register poweroff handler " Guenter Roeck
2014-10-07 5:28 ` [PATCH 34/44] ia64: Register " Guenter Roeck
2014-10-07 5:28 ` [PATCH 37/44] sh: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 38/44] x86: lguest: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 39/44] x86: ce4100: " Guenter Roeck
2014-10-07 5:28 ` [PATCH 40/44] x86: intel-mid: Drop registration of dummy poweroff handlers Guenter Roeck
2014-10-07 5:28 ` [PATCH 43/44] hwmon: (ab8500) Call kernel_power_off instead of pm_power_off Guenter Roeck
2014-10-07 5:28 ` [PATCH 44/44] kernel: Remove pm_power_off Guenter Roeck
2014-10-07 23:43 ` Rafael J. Wysocki
[not found] ` <1412659726-29957-32-git-send-email-linux@roeck-us.net>
2014-10-07 8:04 ` [PATCH 31/44] arm: Register with kernel poweroff handler Nicolas Ferre
[not found] ` <1412659726-29957-36-git-send-email-linux@roeck-us.net>
2014-10-07 9:19 ` [PATCH 35/44] m68k: " Geert Uytterhoeven
[not found] ` <1412659726-29957-6-git-send-email-linux@roeck-us.net>
2014-10-07 10:59 ` [PATCH 05/44] mfd: as3722: Drop reference to pm_power_off from devicetree bindings Mark Rutland
[not found] ` <543412F7.8040909@landley.net>
2014-10-07 16:31 ` Guenter Roeck
2014-10-07 16:59 ` David Daney
[not found] ` <1412659726-29957-34-git-send-email-linux@roeck-us.net>
[not found] ` <20141101101637.GA5765@samfundet.no>
2014-11-01 17:02 ` [PATCH 33/44] avr32: atngw100: Register with kernel poweroff handler 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=54368A30.9070101@roeck-us.net \
--to=linux@roeck-us.net \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=devel@driverdev.osuosl.org \
--cc=devicetree@vger.kernel.org \
--cc=lguest@lists.ozlabs.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-am33-list@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-c6x-dev@linux-c6x.org \
--cc=linux-cris-kernel@axis.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m32r-ja@ml.linux-m32r.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=linux-metag@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-parisc@vger.kernel.orglinux- \
--cc=linux-s390@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=pavel@denx.de \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).