All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Krafft <krafft@de.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: krafft@de.ibm.com
Subject: [RFC] poweroff via pm_power_off if set
Date: Fri, 13 Jun 2008 17:36:49 +0200	[thread overview]
Message-ID: <20080613173649.5451976e@de.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]

This patch is needed to make ipmi_poweroff working on powerpc.
It straightens the poweroff procedure to match with other architectures.
At the moment powerpc plattforms can define their poweroff method using
ppc_md.power_off. The only way for plattform independent driver (ipmi_poweroff)
to register it's poweroff function is to use pm_power_off. So machine_power_off
should check whether pm_power_off has been set and if so it should be used.
If not, plattform dependent ppc_md.power_off should be called.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>

Index: linux.git/arch/powerpc/kernel/setup-common.c
===================================================================
--- linux.git.orig/arch/powerpc/kernel/setup-common.c
+++ linux.git/arch/powerpc/kernel/setup-common.c
@@ -121,6 +121,8 @@ void machine_restart(char *cmd)
 void machine_power_off(void)
 {
 	machine_shutdown();
+	if (pm_power_off)
+		pm_power_off();
 	if (ppc_md.power_off)
 		ppc_md.power_off();
 #ifdef CONFIG_SMP
@@ -133,7 +135,7 @@ void machine_power_off(void)
 /* Used by the G5 thermal driver */
 EXPORT_SYMBOL_GPL(machine_power_off);
 
-void (*pm_power_off)(void) = machine_power_off;
+void (*pm_power_off)(void) = NULL;
 EXPORT_SYMBOL_GPL(pm_power_off);
 
 void machine_halt(void)


-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist


Vorsitzender des Aufsichtsrats:	Martin Jetter
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2008-06-13 15:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 15:36 Christian Krafft [this message]
2008-06-13 16:00 ` [RFC] poweroff via pm_power_off if set Kumar Gala
2008-06-15 15:01   ` Christian Krafft

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=20080613173649.5451976e@de.ibm.com \
    --to=krafft@de.ibm.com \
    --cc=linuxppc-dev@ozlabs.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.