Thread (101 messages) 101 messages, 22 authors, 2015-06-18

Re: [PATCH 08/44] kernel: Move pm_power_off to common code

From: Guenter Roeck <linux@roeck-us.net>
Date: 2014-10-09 13:14:24
Also in: linux-acpi, linux-alpha, linux-devicetree, linux-efi, linux-mips, linux-pm, linux-s390, linux-tegra, linux-um

On 10/09/2014 03:38 AM, Pavel Machek wrote:
Hi!
quoted
@@ -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 ?
quoted
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,
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help