[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1509161255140.1993-100000@iolanthe.rowland.org>
Date: Wed, 16 Sep 2015 12:58:18 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Grygorii Strashko <grygorii.strashko@...com>
cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
Thierry Reding <thierry.reding@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] driver core: Ensure proper suspend/resume ordering
On Wed, 16 Sep 2015, Grygorii Strashko wrote:
> >> The core prohibits new devices from being registered. It does not
> >> prohibit probes of existing devices, because they currently do not
> >> affect the dpm_list.
>
> Seems I missed smth, but I can't find the place in Kernel that prohibits
> creation of new devices during suspend.
>
> Could someone point me on, please?
In Documentation/power/devices.txt, there is a section describing the
various phases of system suspend. The part about the "prepare" phase
says:
1. The prepare phase is meant to prevent races by preventing new devices
from being registered; the PM core would never know that all the
children of a device had been suspended if new children could be
registered at will. (By contrast, devices may be unregistered at any
time.) Unlike the other suspend-related phases, during the prepare
phase the device tree is traversed top-down.
After the prepare callback method returns, no new children may be
registered below the device. The method may also prepare the device or
driver in some way for the upcoming system power transition, but it
should not put the device into a low-power state.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists