On Wed, 26 May 2010, Matthew Garrett wrote: > On Wed, May 26, 2010 at 12:56:33PM -0400, Alan Stern wrote: > > > I don't know how that works. However an easy approach would be to make > > opening the device file (or however the userspace driver gets a > > reference to the device) cause the core to do a pm_runtime_get_sync(), > > with a corresponding pm_runtime_put_sync() when the file is closed. > > No, X is far worse than you think. It's handled by mmap()ping /dev/mem. Ugh. Well, we still need some sort of map for how this will work, otherwise things will quickly get messed up. Is it necessary to stick to a policy that _all_ unbound PCI devices must be active? Even those which were bound to a driver and then unbound? Is there some way for the core to tell which devices will be handled by X, so that all others can be runtime suspended? When a PCI driver's probe routine is called, it shouldn't need to call pm_runtime_set_active() or pm_runtime_enable(). The core should take care of this before the device is registered. One reasonably design would be to make PM-aware drivers responsible for doing an initial pm_runtime_put_sync() in order to allow their devices to suspend (plus a corresponding pm_runtime_get_sync() in the release method). Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html