<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/base/power/opp, branch linux-4.13.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.13.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-10-05T07:47:35Z</updated>
<entry>
<title>PM / OPP: Call notifier without holding opp_table-&gt;lock</title>
<updated>2017-10-05T07:47:35Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-09-21T17:44:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5bf264461b2a45d28cdc1ba90ffa9bd52e667d2c'/>
<id>urn:sha1:5bf264461b2a45d28cdc1ba90ffa9bd52e667d2c</id>
<content type='text'>
commit e4d8ae00169f7686e1da5a62e5cf797d12bf8822 upstream.

The notifier callbacks may want to call some OPP helper routines which
may try to take the same opp_table-&gt;lock again and cause a deadlock. One
such usecase was reported by Chanwoo Choi, where calling
dev_pm_opp_disable() leads us to the devfreq's OPP notifier handler,
which further calls dev_pm_opp_find_freq_floor() and it deadlocks.

We don't really need the opp_table-&gt;lock to be held across the notifier
call though, all we want to make sure is that the 'opp' doesn't get
freed while being used from within the notifier chain. We can do it with
help of dev_pm_opp_get/put() as well. Let's do it.

Fixes: 5b650b388844 "PM / OPP: Take kref from _find_opp_table()"
Reported-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Tested-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>PM / OPP: Add dev_pm_opp_{set|put}_clkname()</title>
<updated>2017-06-23T23:41:55Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-06-21T04:59:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=829a4e8c0e9aab17bcfe2ddb070388b8ada26292'/>
<id>urn:sha1:829a4e8c0e9aab17bcfe2ddb070388b8ada26292</id>
<content type='text'>
In order to support OPP switching, OPP layer needs to get pointer to the
clock for the device. Simple cases work fine without using the routines
added by this patch (i.e.  by passing connection-id as NULL), but for a
device with multiple clocks available, the OPP core needs to know the
exact name of the clk to use.

Add a new set of APIs to get that done.

Tested-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Don't create debugfs "supply-0" directory unnecessarily</title>
<updated>2017-06-22T01:15:30Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-05-23T04:02:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1fae788ed640e2a961c2edab54bfd56c73e2506a'/>
<id>urn:sha1:1fae788ed640e2a961c2edab54bfd56c73e2506a</id>
<content type='text'>
We create "supply-0" debugfs directory even if the device doesn't do
voltage scaling. That looks confusing, as if the regulator is found but
we never managed to get voltage levels for it.

Avoid creating such a directory unnecessarily.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: opp-microvolt is not optional if regulators are set</title>
<updated>2017-06-22T01:15:30Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-05-23T04:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=688a48b0d27000167e0450bc1243e29a560395ca'/>
<id>urn:sha1:688a48b0d27000167e0450bc1243e29a560395ca</id>
<content type='text'>
If dev_pm_opp_set_regulators() is called for a device and its regulators
are set in the OPP core, the OPP nodes for the device must contain the
"opp-microvolt" property, otherwise there is something wrong and we
better error out.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Don't create copy of regulators unnecessarily</title>
<updated>2017-06-22T01:15:30Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-05-23T04:02:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=478256bddb0323898694bd22acdf42a70d4ff024'/>
<id>urn:sha1:478256bddb0323898694bd22acdf42a70d4ff024</id>
<content type='text'>
This code was required while the OPP core was managed with help of RCUs,
but not anymore. Get rid of unnecessary alloc/memcpy operations.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Reorganize _generic_set_opp_regulator()</title>
<updated>2017-06-22T01:15:29Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-05-23T04:02:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c74b32fadc00f2412d86a19295eb867b1a772948'/>
<id>urn:sha1:c74b32fadc00f2412d86a19295eb867b1a772948</id>
<content type='text'>
The code was overly complicated here because of the limitations that we
had with RCUs (Couldn't use opp-table and OPPs outside RCU protected
section and can't call sleep-able routines from within that). But that
is long gone now.

Reorganize _generic_set_opp_regulator() in order to avoid using "struct
dev_pm_set_opp_data" and copying data into it for the case where
opp_table-&gt;set_opp is not set.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: fix off-by-one bug in dev_pm_opp_get_max_volt_latency loop</title>
<updated>2017-02-23T22:00:31Z</updated>
<author>
<name>Andrzej Hajda</name>
</author>
<published>2017-02-20T18:57:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8cc311167c22f9365304b2b20225df2d881c8843'/>
<id>urn:sha1:8cc311167c22f9365304b2b20225df2d881c8843</id>
<content type='text'>
Reading array at given index before checking if index is valid results in
illegal memory access.

The bug was detected using KASAN framework.

Signed-off-by: Andrzej Hajda &lt;a.hajda@samsung.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Expose _of_get_opp_desc_node as dev_pm_opp API</title>
<updated>2017-02-09T21:52:17Z</updated>
<author>
<name>Dave Gerlach</name>
</author>
<published>2017-02-03T17:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0764c604c8128f17fd740ff8b1701d0a1301eb7e'/>
<id>urn:sha1:0764c604c8128f17fd740ff8b1701d0a1301eb7e</id>
<content type='text'>
Rename _of_get_opp_desc_node to dev_pm_opp_of_get_opp_desc_node and add it
to include/linux/pm_opp.h to allow other drivers, such as platform OPP
and cpufreq drivers, to make use of it.

Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Dave Gerlach &lt;d-gerlach@ti.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Make _find_opp_table_unlocked() static</title>
<updated>2017-02-07T12:39:25Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2017-02-06T14:29:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ac423973397d17684528e89fbbca49b2ff7bb43'/>
<id>urn:sha1:6ac423973397d17684528e89fbbca49b2ff7bb43</id>
<content type='text'>
Fixes the following sparse warning:

drivers/base/power/opp/core.c:49:18: warning:
 symbol '_find_opp_table_unlocked' was not declared. Should it be static?

Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Simplify dev_pm_opp_get_max_volt_latency()</title>
<updated>2017-01-30T08:22:22Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-23T04:41:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cdd3e614cfda724826ec8a522022709380b84597'/>
<id>urn:sha1:cdd3e614cfda724826ec8a522022709380b84597</id>
<content type='text'>
dev_pm_opp_get_max_volt_latency() calls _find_opp_table() two times
effectively.

Merge _get_regulator_count() into dev_pm_opp_get_max_volt_latency() to
avoid that.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
