All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/7] powerpc: Rework pm_power_off & machine_[restart|power_off|halt]
@ 2007-12-04  5:37 Mark A. Greer
  2007-12-04  5:43 ` [PATCH 1/7] powerpc: Drivers should call machine_power_off not pm_power_off Mark A. Greer
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Mark A. Greer @ 2007-12-04  5:37 UTC (permalink / raw)
  To: linuxppc-dev

We seem to have the pm_power_off hook wrong in arch/powerpc.  From the
other arches and from how its used by the rest of the kernel (e.g., ipmi),
it should point to the lowest-level power off function not to
machine_power_off().  Actually, machine_power_off() should call pm_power_off
since AFAICT it is the one and only interface used by the rest of the kernel
to power a machine off (with one exception which I believe to be a bug and
have a patch in this series to fix).

While looking at this, I found several bits of code that needed minor
rework and/or cleaning up.  These bits include: refactoring some
common code used by the machine_xxx routines, having machine_power_off
call ppc_md.halt if there ppc_md.power_off is NULL or returns, having
machine_halt call ppc_md.power_off it ppc_md.halt is NULL or returns,
and removing some useless xxx_halt and xxx_power_off routines in
platform code.

With the new usage of pm_power_off, the ppc_md.power_off hook is
no longer needed and pm_power_off will be assigned in the platform
probe routine.

The end result of all of these patches should make the check of
pm_power_off being NULL in kernel/sys.c:sys_reboot useful for powerpc,
eliminate the need for platform halt routines to call the power off routine
(and vice versa), allow things like IPMI to take over pm_power_off
when they need to, and make the power off/halt related code a bit cleaner
& consistent.

I still have to make sure I didn't miss anything and I haven't compiled
all the files I've touched so these aren't submission candidates yet.

I'd appreciate any feedback.

Thanks,

Mark

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-12-05  0:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-04  5:37 [RFC 0/7] powerpc: Rework pm_power_off & machine_[restart|power_off|halt] Mark A. Greer
2007-12-04  5:43 ` [PATCH 1/7] powerpc: Drivers should call machine_power_off not pm_power_off Mark A. Greer
2007-12-04  5:44 ` [PATCH 2/7] powerpc: xmon should call machine_xxx not ppc_md.xxx directly Mark A. Greer
2007-12-04  5:45 ` [PATCH 3/7] powerpc: ras.c should call machine_power_off() Mark A. Greer
2007-12-04  5:47 ` [PATCH 4/7] powerpc: Rework the machine_[restart|power_off|halt] routines Mark A. Greer
2007-12-04  7:20   ` Benjamin Herrenschmidt
2007-12-04  5:48 ` [PATCH 5/7] powerpc: Replace ppc_md.power_off with pm_power_off Mark A. Greer
2007-12-04  7:23   ` Benjamin Herrenschmidt
2007-12-04 18:01     ` Mark A. Greer
2007-12-04 19:55       ` Benjamin Herrenschmidt
2007-12-04 20:05         ` Grant Likely
2007-12-04 20:24           ` Benjamin Herrenschmidt
2007-12-05  0:07           ` Mark A. Greer
2007-12-04  5:49 ` [PATCH 6/7] powerpc: Remove redundant power_off and halt routines Mark A. Greer
2007-12-04  5:50 ` [PATCH 7/7] powerpc: Remove incorrect panic() calls Mark A. Greer

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.