linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] ARM: Use syscore_ops for "core" power management
@ 2011-03-27 23:25 Rafael J. Wysocki
  2011-03-27 23:26 ` [PATCH 1/7] ARM: Use struct syscore_ops instead of sysdevs for PM in common code Rafael J. Wysocki
                   ` (7 more replies)
  0 siblings, 8 replies; 38+ messages in thread
From: Rafael J. Wysocki @ 2011-03-27 23:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

There are multiple problems with sysdevs, or struct sys_device objects to
be precise, that are so annoying that some people have started to think
of removind them entirely from the kernel.  To me, personally, the most
obvious issue is the way sysdevs are used for defining suspend/resume
callbacks to be executed with one CPU on-line and interrupts disabled.
Apart from this, sysdevs do not follow general rules related to the
representation of things in /sys/devices/, so user space that uses
/sys/devices/ to retrieve information on device hierarchy layout and
device configuration, such as udev, cannot really handle them correctly.

Some subsystems need to carry out certain operations during suspend after
we've disabled non-boot CPUs and interrupts have been switched off on the
only on-line one.  Currently, the only way to achieve that is to define
sysdev suspend/resume callbacks, but this is cumbersome and inefficient.
Namely, to do that, one has to define a sysdev class providing the callbacks
and a sysdev actually using them, which is excessively complicated.  Moreover,
the sysdev suspend/resume callbacks take arguments that are not really used
by the majority of subsystems defining sysdev suspend/resume callbacks
(or even if they are used, they don't really need to be used, so they
are simply unnecessary).  Of course, if a sysdev is only defined to provide
suspend/resume (and maybe shutdown) callbacks, there's no real reason why
it should show up in sysfs.

For this reason, I thought it would be a good idea to provide a simpler
interface for subsystems to define "very late" suspend callbacks and
"very early" resume callbacks (and "very late" shutdown callbacks as well)
without the entire bloat related to sysdevs.  Such an interface has been
merged recently in the form of struct syscore_ops framework that can be used
to replace sysdevs in the "core" power management area.

The x86 architecture and subsystems it depends on have already been converted
to using the new framework instead of sysdevs for "core" power management and
the following series of patches does the analogous thing for the ARM
architecture.  I have done my best to build the kernel for every affected
platform, but unfortunately some of them don't build even without my changes,
so some minor issues might have slept through my fingers.  Hopefully, though,
there won't be too many of them.

[1/7] - Use syscore_ops for "core" PM in some common ARM code.
[2/7] - Use syscore_ops for "core" PM on OMAP.
[3/7] - Use syscore_ops for "core" PM on Integrator.
[4/7] - Use syscore_ops for "core" PM on SA1100.
[5/7] - Use syscore_ops for "core" PM on PXA-based platforms.
[6/7] - Use syscore_ops for "core" PM on Samsung platforms.
[7/7] - Mark ARM select CONFIG_ARCH_NO_SYSDEV_OPS.

Thanks,
Rafael

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

end of thread, other threads:[~2011-07-08 18:12 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-27 23:25 [PATCH 0/7] ARM: Use syscore_ops for "core" power management Rafael J. Wysocki
2011-03-27 23:26 ` [PATCH 1/7] ARM: Use struct syscore_ops instead of sysdevs for PM in common code Rafael J. Wysocki
2011-03-27 23:27 ` [PATCH 2/7] ARM / OMAP: Use struct syscore_ops for "core" power management Rafael J. Wysocki
2011-03-28 16:18   ` Kevin Hilman
2011-03-27 23:27 ` [PATCH 3/7] ARM / Integrator: " Rafael J. Wysocki
2011-03-27 23:28 ` [PATCH 4/7] ARM / SA1100: " Rafael J. Wysocki
2011-03-27 23:29 ` [PATCH 5/7] ARM / PXA: " Rafael J. Wysocki
2011-03-27 23:29 ` [PATCH 6/7] ARM / Samsung: " Rafael J. Wysocki
2011-03-27 23:45   ` Ben Dooks
2011-03-28 19:42     ` Rafael J. Wysocki
2011-07-08 18:12     ` Rafael J. Wysocki
2011-03-27 23:30 ` [PATCH 7/7] ARM: Select CONFIG_ARCH_NO_SYSDEV_OPS Rafael J. Wysocki
2011-04-17 21:01 ` [PATCH 0/14] Remove sysdev suspend/resume and shutdown operations Rafael J. Wysocki
2011-04-17 21:05   ` [PATCH 1/14] PM: Fix error code paths executed after failing syscore_suspend() Rafael J. Wysocki
2011-04-17 21:06   ` [PATCH 2/14] PM: Add missing syscore_suspend() and syscore_resume() calls Rafael J. Wysocki
2011-04-18  8:51     ` Ian Campbell
2011-04-17 21:07   ` [PATCH 3/14] ARM: Use struct syscore_ops instead of sysdevs for PM in common code Rafael J. Wysocki
2011-04-17 21:08   ` [PATCH 4/14] ARM / OMAP: Use struct syscore_ops for "core" power management Rafael J. Wysocki
2011-04-17 21:09   ` [PATCH 5/14] ARM / Integrator: Use struct syscore_ops for core PM Rafael J. Wysocki
2011-04-17 21:10   ` [PATCH 6/14] ARM / SA1100: Use struct syscore_ops for "core" power management Rafael J. Wysocki
2011-04-17 21:10   ` [PATCH 7/14] ARM / PXA: " Rafael J. Wysocki
2011-04-17 21:11   ` [PATCH 8/14] ARM / Samsung: " Rafael J. Wysocki
2011-04-17 21:49     ` Kukjin Kim
2011-04-17 21:11   ` [PATCH 9/14] PM / Blackfin: Use struct syscore_ops instead of sysdevs for PM Rafael J. Wysocki
2011-04-18  2:34     ` Mike Frysinger
2011-04-18 21:43       ` Rafael J. Wysocki
2011-04-17 21:12   ` [PATCH 10/14] PM / MIPS: " Rafael J. Wysocki
2011-04-18 10:12     ` Ralf Baechle
2011-04-18 20:03       ` Rafael J. Wysocki
2011-04-19  3:08     ` Lars-Peter Clausen
2011-04-17 21:13   ` [PATCH 11/14] PM / AVR32: " Rafael J. Wysocki
2011-04-26 12:22     ` Hans-Christian Egtvedt
2011-04-26 17:14       ` Rafael J. Wysocki
2011-04-17 21:13   ` [PATCH 12/14] PM / UNICORE32: " Rafael J. Wysocki
2011-04-19  8:02     ` Guan Xuetao
2011-04-17 21:14   ` [PATCH 13/14] PM / PowerPC: " Rafael J. Wysocki
2011-04-17 21:15   ` [PATCH 14/14] PM: Remove sysdev suspend, resume and shutdown operations Rafael J. Wysocki
2011-04-18  6:02   ` [PATCH 0/14] Remove sysdev suspend/resume " Greg KH

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