<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/power/domain.c, branch linux-3.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.2.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-12T14:27:12Z</updated>
<entry>
<title>PM / Domains: Fix unsafe iteration over modified list of device links</title>
<updated>2017-10-12T14:27:12Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2017-06-28T14:56:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f35e6385a5169ceac0340d12ae24b1e6606de4d3'/>
<id>urn:sha1:f35e6385a5169ceac0340d12ae24b1e6606de4d3</id>
<content type='text'>
commit c6e83cac3eda5f7dd32ee1453df2f7abb5c6cd46 upstream.

pm_genpd_remove_subdomain() iterates over domain's master_links list and
removes matching element thus it has to use safe version of list
iteration.

Fixes: f721889ff65a ("PM / Domains: Support for generic I/O PM domains (v8)")
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Revert "PM / Domains: Fix handling of wakeup devices during system resume"</title>
<updated>2013-09-10T00:57:29Z</updated>
<author>
<name>Ben Hutchings</name>
</author>
<published>2013-09-04T22:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c19c6a8bdb5454d4a98159adab3cc86418628da'/>
<id>urn:sha1:3c19c6a8bdb5454d4a98159adab3cc86418628da</id>
<content type='text'>
This reverts commit 5c6156fac087f551cbd57499f4bed2fc614d70cd, which
was commit cc85b20780562d404e18a47b9b55b4a5102ae53e upstream.

It broke ARM &amp;&amp; PM configurations by adding a call to
genpd_dev_active_wakeup() which was only added in Linux 3.3.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Fix handling of wakeup devices during system resume</title>
<updated>2012-04-02T16:52:37Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2012-03-13T21:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c6156fac087f551cbd57499f4bed2fc614d70cd'/>
<id>urn:sha1:5c6156fac087f551cbd57499f4bed2fc614d70cd</id>
<content type='text'>
commit cc85b20780562d404e18a47b9b55b4a5102ae53e upstream.

During system suspend pm_genpd_suspend_noirq() checks if the given
device is in a wakeup path (i.e. it appears to be needed for one or
more wakeup devices to work or is a wakeup device itself) and if it
needs to be "active" for wakeup to work.  If that is the case, the
function returns 0 without incrementing the device domain's counter
of suspended devices and without executing genpd_stop_dev() for the
device.  In consequence, the device is not stopped (e.g. its clock
isn't disabled) and power is always supplied to its domain in the
resulting system sleep state.

However, pm_genpd_resume_noirq() doesn't repeat that check and it
runs genpd_start_dev() and decrements the domain's counter of
suspended devices even for the wakeup device that weren't stopped by
pm_genpd_suspend_noirq().  As a result, the start callback may be run
unnecessarily for them and their domains' counters of suspended
devices may become negative.  Both outcomes aren't desirable, so fix
pm_genpd_resume_noirq() to look for wakeup devices that might not be
stopped by during system suspend.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Tested-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / Sleep: Mark devices involved in wakeup signaling during suspend</title>
<updated>2011-10-21T22:19:29Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-10-16T21:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4ca46ff3e0d8c234cb40ebb6457653b59584426c'/>
<id>urn:sha1:4ca46ff3e0d8c234cb40ebb6457653b59584426c</id>
<content type='text'>
The generic PM domains code in drivers/base/power/domain.c has
to avoid powering off domains that provide power to wakeup devices
during system suspend.  Currently, however, this only works for
wakeup devices directly belonging to the given domain and not for
their children (or the children of their children and so on).
Thus, if there's a wakeup device whose parent belongs to a power
domain handled by the generic PM domains code, the domain will be
powered off during system suspend preventing the device from
signaling wakeup.

To address this problem introduce a device flag, power.wakeup_path,
that will be set during system suspend for all wakeup devices,
their parents, the parents of their parents and so on.  This way,
all wakeup paths in the device hierarchy will be marked and the
generic PM domains code will only need to avoid powering off
domains containing devices whose power.wakeup_path is set.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Split device PM domain data into base and need_restore</title>
<updated>2011-09-26T18:22:02Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-09-26T18:22:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd0ea672f58d5cfdea271c45cec0c897f2b792aa'/>
<id>urn:sha1:cd0ea672f58d5cfdea271c45cec0c897f2b792aa</id>
<content type='text'>
The struct pm_domain_data data type is defined in such a way that
adding new fields specific to the generic PM domains code will
require include/linux/pm.h to be modified.  As a result, data types
used only by the generic PM domains code will be defined in two
headers, although they all should be defined in pm_domain.h and
pm.h will need to include more headers, which won't be very nice.

For this reason change the definition of struct pm_subsys_data
so that its domain_data member is a pointer, which will allow
struct pm_domain_data to be subclassed by various PM domains
implementations.  Remove the need_restore member from
struct pm_domain_data and make the generic PM domains code
subclass it by adding the need_restore member to the new data type.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Preliminary support for devices with power.irq_safe set</title>
<updated>2011-08-25T13:37:04Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-08-25T13:37:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0aa2a221696cc8ea20a4cdca01315d3b6b4ecc4d'/>
<id>urn:sha1:0aa2a221696cc8ea20a4cdca01315d3b6b4ecc4d</id>
<content type='text'>
The generic PM domains framework currently doesn't work with devices
whose power.irq_safe flag is set, because runtime PM callbacks for
such devices are run with interrupts disabled and the callbacks
provided by the generic PM domains framework use domain mutexes
and may sleep.  However, such devices very well may belong to
power domains on some systems, so the generic PM domains framework
should take them into account.

For this reason, modify the generic PM domains framework so that the
domain .power_off() and .power_on() callbacks are never executed for
a domain containing devices with power.irq_safe set, although the
.stop_device() and .start_device() callbacks are still run for them.

Additionally, introduce a flag allowing the creator of a
struct generic_pm_domain object to indicate that its .stop_device()
and .start_device() callbacks may be run in interrupt context
(might_sleep_if() triggers if that flag is not set and one of those
callbacks is run in interrupt context).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Use power.sybsys_data to reduce overhead</title>
<updated>2011-08-25T13:34:12Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-08-25T13:34:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4605ab653c1f9d7cc2dda8033de215c9cee325f4'/>
<id>urn:sha1:4605ab653c1f9d7cc2dda8033de215c9cee325f4</id>
<content type='text'>
Currently pm_genpd_runtime_resume() has to walk the list of devices
from the device's PM domain to find the corresponding device list
object containing the need_restore field to check if the driver's
.runtime_resume() callback should be executed for the device.
This is suboptimal and can be simplified by using power.sybsys_data
to store device information used by the generic PM domains code.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Rename argument of pm_genpd_add_subdomain()</title>
<updated>2011-08-25T13:33:45Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-08-08T21:43:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bc0403ff16e5305c3a14c2b0826616ceaabbf058'/>
<id>urn:sha1:bc0403ff16e5305c3a14c2b0826616ceaabbf058</id>
<content type='text'>
Change the name of the second argument of pm_genpd_add_subdomain()
so that it is (a) shorter and (b) in agreement with the name of
the second argument of pm_genpd_add_subdomain().

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Rename GPD_STATE_WAIT_PARENT to GPD_STATE_WAIT_MASTER</title>
<updated>2011-08-25T13:33:45Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-08-08T21:43:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17877eb5a900f32bb5827a7b2109b6c9adff5fc3'/>
<id>urn:sha1:17877eb5a900f32bb5827a7b2109b6c9adff5fc3</id>
<content type='text'>
Since it is now possible for a PM domain to have multiple masters
instead of one parent, rename the "wait for parent" status to reflect
the new situation.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
<entry>
<title>PM / Domains: Allow generic PM domains to have multiple masters</title>
<updated>2011-08-25T13:33:44Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2011-08-08T21:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5063ce1571b73865cbdcd92db002e85809750c97'/>
<id>urn:sha1:5063ce1571b73865cbdcd92db002e85809750c97</id>
<content type='text'>
Currently, for a given generic PM domain there may be only one parent
domain (i.e. a PM domain it depends on).  However, there is at least
one real-life case in which there should be two parents (masters) for
one PM domain (the A3RV domain on SH7372 turns out to depend on the
A4LC domain and it depends on the A4R domain and the same time). For
this reason, allow a PM domain to have multiple parents (masters) by
introducing objects representing links between PM domains.

The (logical) links between PM domains represent relationships in
which one domain is a master (i.e. it is depended on) and another
domain is a slave (i.e. it depends on the master) with the rule that
the slave cannot be powered on if the master is not powered on and
the master cannot be powered off if the slave is not powered off.
Each struct generic_pm_domain object representing a PM domain has
two lists of links, a list of links in which it is a master and
a list of links in which it is a slave.  The first of these lists
replaces the list of subdomains and the second one is used in place
of the parent pointer.

Each link is represented by struct gpd_link object containing
pointers to the master and the slave and two struct list_head
members allowing it to hook into two lists (the master's list
of "master" links and the slave's list of "slave" links).  This
allows the code to get to the link from each side (either from
the master or from the slave) and follow it in each direction.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
</content>
</entry>
</feed>
