<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/opp/of.c, branch v5.9.12</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.9.12</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.9.12'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-08-03T11:11:39+00:00</updated>
<entry>
<title>Merge branches 'pm-em' and 'pm-core'</title>
<updated>2020-08-03T11:11:39+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-08-03T11:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b5642075c317e67ea342a2fb8023a8e754a5002'/>
<id>urn:sha1:5b5642075c317e67ea342a2fb8023a8e754a5002</id>
<content type='text'>
* pm-em:
  OPP: refactor dev_pm_opp_of_register_em() and update related drivers
  Documentation: power: update Energy Model description
  PM / EM: change name of em_pd_energy to em_cpu_energy
  PM / EM: remove em_register_perf_domain
  PM / EM: add support for other devices than CPUs in Energy Model
  PM / EM: update callback structure and add device pointer
  PM / EM: introduce em_dev_register_perf_domain function
  PM / EM: change naming convention from 'capacity' to 'performance'

* pm-core:
  mmc: jz4740: Use pm_ptr() macro
  PM: Make *_DEV_PM_OPS macros use __maybe_unused
  PM: core: introduce pm_ptr() macro
</content>
</entry>
<entry>
<title>opp: Increase parsed_static_opps in _of_add_opp_table_v1()</title>
<updated>2020-07-16T03:20:54+00:00</updated>
<author>
<name>Walter Lozano</name>
<email>walter.lozano@collabora.com</email>
</author>
<published>2020-07-16T02:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6544abc520f0fff701e9da382110dc29676c683a'/>
<id>urn:sha1:6544abc520f0fff701e9da382110dc29676c683a</id>
<content type='text'>
Currently, when using _of_add_opp_table_v2 parsed_static_opps is
increased and this value is used in _opp_remove_all_static() to
check if there are static opp entries that need to be freed.
Unfortunately this does not happen when using _of_add_opp_table_v1(),
which leads to warnings.

This patch increases parsed_static_opps in _of_add_opp_table_v1() in a
similar way as in _of_add_opp_table_v2().

Fixes: 03758d60265c ("opp: Replace list_kref with a local counter")
Cc: v5.6+ &lt;stable@vger.kernel.org&gt; # v5.6+
Signed-off-by: Walter Lozano &lt;walter.lozano@collabora.com&gt;
[ Viresh: Do the operation with lock held and set the value to 1 instead
	  of incrementing it ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: refactor dev_pm_opp_of_register_em() and update related drivers</title>
<updated>2020-06-24T15:16:42+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2020-05-27T09:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e0ffa855d1590e54ec0033404a49e2e57e294fe'/>
<id>urn:sha1:0e0ffa855d1590e54ec0033404a49e2e57e294fe</id>
<content type='text'>
The Energy Model framework supports not only CPU devices. Drop the CPU
specific interface with cpumask and add struct device. Add also a return
value, user might use it. This new interface provides easy way to create
a simple Energy Model, which then might be used by e.g. thermal subsystem.

Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / EM: update callback structure and add device pointer</title>
<updated>2020-06-24T15:14:07+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2020-05-27T09:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d0351cc3b0f57214d157e4d589564730af2aedae'/>
<id>urn:sha1:d0351cc3b0f57214d157e4d589564730af2aedae</id>
<content type='text'>
The Energy Model framework is going to support devices other that CPUs. In
order to make this happen change the callback function and add pointer to
a device as an argument.

Update the related users to use new function and new callback from the
Energy Model.

Acked-by: Quentin Perret &lt;qperret@google.com&gt;
Signed-off-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Acked-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>opp: Don't parse icc paths unnecessarily</title>
<updated>2020-06-01T07:40:15+00:00</updated>
<author>
<name>Sibi Sankar</name>
<email>sibis@codeaurora.org</email>
</author>
<published>2020-05-27T19:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=45679f9b508f10c12a1e93cf2bdccbc1c594aa39'/>
<id>urn:sha1:45679f9b508f10c12a1e93cf2bdccbc1c594aa39</id>
<content type='text'>
The DT node of the device may contain interconnect paths while the OPP
table doesn't have the bandwidth values. There is no need to parse the
paths in such cases.

Signed-off-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Tested-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Reviewed-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
[ Viresh: Support the case of !opp_table and massaged changelog ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Add sanity checks in _read_opp_key()</title>
<updated>2020-05-29T04:45:08+00:00</updated>
<author>
<name>Georgi Djakov</name>
<email>georgi.djakov@linaro.org</email>
</author>
<published>2020-05-12T12:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=120e117bdc8483773fdae19dd326ef460b1ab4c2'/>
<id>urn:sha1:120e117bdc8483773fdae19dd326ef460b1ab4c2</id>
<content type='text'>
When we read the OPP keys, it would be nice to do some sanity checks
of the values we get from DT and see if they match with the information
that is populated in the OPP table. Let's pass a pointer of the table,
so that we can do some validation.

Signed-off-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
[ Viresh: Fix rebase conflicts ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Add support for parsing interconnect bandwidth</title>
<updated>2020-05-29T04:45:08+00:00</updated>
<author>
<name>Georgi Djakov</name>
<email>georgi.djakov@linaro.org</email>
</author>
<published>2020-05-12T12:53:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d3f922c46f2e91f63c92f8dd28381f097082912'/>
<id>urn:sha1:6d3f922c46f2e91f63c92f8dd28381f097082912</id>
<content type='text'>
The OPP bindings now support bandwidth values, so add support to parse it
from device tree and store it into the new dev_pm_opp_icc_bw struct, which
is part of the dev_pm_opp.

Signed-off-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
[ Viresh: Create _read_bw() and use it, renamed _of_find_icc_paths() to
	  dev_pm_opp_of_find_icc_paths(), exported it and made opp_table
	  argument optional. Also drop the depends on from Kconfig. ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: Add helpers for reading the binding properties</title>
<updated>2020-05-13T06:18:13+00:00</updated>
<author>
<name>Saravana Kannan</name>
<email>saravanak@google.com</email>
</author>
<published>2020-05-12T12:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6c591eec67cbb4db988ab35b944f5cf9013c0714'/>
<id>urn:sha1:6c591eec67cbb4db988ab35b944f5cf9013c0714</id>
<content type='text'>
The opp-hz DT property is not mandatory and we may use another property
as a key in the OPP table. Add helper functions to simplify the reading
and comparing the keys.

Signed-off-by: Saravana Kannan &lt;saravanak@google.com&gt;
Signed-off-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
[ Viresh: Removed an unnecessary comment ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Replace list_kref with a local counter</title>
<updated>2019-12-10T10:27:00+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2019-11-11T11:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03758d60265c773e1d06d436b99ee338f2ac55d6'/>
<id>urn:sha1:03758d60265c773e1d06d436b99ee338f2ac55d6</id>
<content type='text'>
A kref or refcount isn't the right tool to be used here for counting
number of devices that are sharing the static OPPs created for the OPP
table. For example, we are reinitializing the kref again, after it
reaches a value of 0 and frees the resources, if the static OPPs get
added for the same OPP table structure (as the OPP table structure was
never freed). That is messy and very unclear.

This patch makes parsed_static_opps an unsigned integer and uses it to
count the number of users of the static OPPs. The increment and
decrement to parsed_static_opps is done under opp_table-&gt;lock now to
make sure no races are possible if the OPP table is getting added and
removed in parallel (which doesn't happen in practice, but can in
theory).

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Free static OPPs on errors while adding them</title>
<updated>2019-12-10T10:26:56+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2019-11-18T09:11:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba0033192145cbd4e70ef64552958b13d597eb9e'/>
<id>urn:sha1:ba0033192145cbd4e70ef64552958b13d597eb9e</id>
<content type='text'>
The static OPPs aren't getting freed properly, if errors occur while
adding them. Fix that by calling _put_opp_list_kref() and putting their
reference on failures.

Fixes: 11e1a1648298 ("opp: Don't decrement uninitialized list_kref")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
</feed>
