<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-obmc-linux/drivers/devfreq, branch dev-5.0-raptor-04-16-2019</title>
<subtitle>Blackbird™ Linux sources for OpenBMC</subtitle>
<id>https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-obmc-linux/atom?h=dev-5.0-raptor-04-16-2019'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/'/>
<updated>2018-12-11T02:40:13+00:00</updated>
<entry>
<title>PM / devfreq: add devfreq_suspend/resume() functions</title>
<updated>2018-12-11T02:40:13+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>l.luba@partner.samsung.com</email>
</author>
<published>2018-12-05T11:05:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=5903195605287681f55094bbcdf8711ea109969b'/>
<id>urn:sha1:5903195605287681f55094bbcdf8711ea109969b</id>
<content type='text'>
This patch adds implementation for global suspend/resume for
devfreq framework. System suspend will next use these functions.

Suggested-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Suggested-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Lukasz Luba &lt;l.luba@partner.samsung.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: add support for suspend/resume of a devfreq device</title>
<updated>2018-12-11T02:09:47+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>l.luba@partner.samsung.com</email>
</author>
<published>2018-12-05T11:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=83f8ca45afbf041e312909f442128b99657d90b7'/>
<id>urn:sha1:83f8ca45afbf041e312909f442128b99657d90b7</id>
<content type='text'>
The patch prepares devfreq device for handling suspend/resume
functionality. The new fields will store needed information during this
process. Devfreq framework handles opp-suspend DT entry and there is no
need of modyfications in the drivers code. It uses atomic variables to
make sure no race condition affects the process.

Suggested-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Suggested-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Lukasz Luba &lt;l.luba@partner.samsung.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: refactor set_target frequency function</title>
<updated>2018-12-11T02:09:44+00:00</updated>
<author>
<name>Lukasz Luba</name>
<email>l.luba@partner.samsung.com</email>
</author>
<published>2018-12-05T11:05:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=633141721b5bfce7017033a767208af591134b8f'/>
<id>urn:sha1:633141721b5bfce7017033a767208af591134b8f</id>
<content type='text'>
The refactoring is needed for the new client in devfreq: suspend.
To avoid code duplication, move it to the new local function
devfreq_set_target.

Suggested-by: Tobias Jakobi &lt;tjakobi@math.uni-bielefeld.de&gt;
Suggested-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Lukasz Luba &lt;l.luba@partner.samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: remove redundant null pointer check before kfree</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>zhong jiang</name>
<email>zhongjiang@huawei.com</email>
</author>
<published>2018-09-21T13:18:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=8188b154f95014dae4d19892fefb202c8df3f885'/>
<id>urn:sha1:8188b154f95014dae4d19892fefb202c8df3f885</id>
<content type='text'>
kfree has taken the null pointer into account. hence it is safe
to remove the redundant null pointer check before kfree.

Signed-off-by: zhong jiang &lt;zhongjiang@huawei.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: stopping the governor before device_unregister()</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Vincent Donnefort</name>
<email>vincent.donnefort@arm.com</email>
</author>
<published>2018-09-03T00:02:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=2f061fd0c2d852e32e03a903fccd810663c5c31e'/>
<id>urn:sha1:2f061fd0c2d852e32e03a903fccd810663c5c31e</id>
<content type='text'>
device_release() is freeing the resources before calling the device
specific release callback which is, in the case of devfreq, stopping
the governor.

It is a problem as some governors are using the device resources. e.g.
simpleondemand which is using the devfreq deferrable monitoring work. If it
is not stopped before the resources are freed, it might lead to a use after
free.

Signed-off-by: Vincent Donnefort &lt;vincent.donnefort@arm.com&gt;
Reviewed-by: John Einar Reitan &lt;john.reitan@arm.com&gt;
[cw00.choi: Fix merge conflict]
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Convert to using %pOFn instead of device_node.name</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2018-08-28T01:52:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=f037eb8c1f476bc903d99695c1eb9f99ccb46b27'/>
<id>urn:sha1:f037eb8c1f476bc903d99695c1eb9f99ccb46b27</id>
<content type='text'>
In preparation to remove the node name pointer from struct device_node,
convert printf users to use the %pOFn format specifier.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Make update_devfreq() public</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2018-08-03T20:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=b596d895fa2957e136a6b398b97b06bd42b51291'/>
<id>urn:sha1:b596d895fa2957e136a6b398b97b06bd42b51291</id>
<content type='text'>
Currently update_devfreq() is only visible to devfreq governors outside
of devfreq.c. Make it public to allow drivers that adjust devfreq policies
to cause a re-evaluation of the frequency after a policy change.

Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Don't adjust to user limits in governors</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2018-08-03T20:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=6ff66e2a008337b8a005fd0ae2037bed716262cc'/>
<id>urn:sha1:6ff66e2a008337b8a005fd0ae2037bed716262cc</id>
<content type='text'>
Several governors use the user space limits df-&gt;min/max_freq to adjust
the target frequency. This is not necessary, since update_devfreq()
already takes care of this. Instead the governor can request the available
min/max frequency by setting the target frequency to DEVFREQ_MIN/MAX_FREQ
and let update_devfreq() take care of any adjustments.

Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Fix handling of min/max_freq == 0</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Matthias Kaehlcke</name>
<email>mka@chromium.org</email>
</author>
<published>2018-08-03T20:05:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=df5cf4a36178c5d4f2b8b9469cb2f722e64cd102'/>
<id>urn:sha1:df5cf4a36178c5d4f2b8b9469cb2f722e64cd102</id>
<content type='text'>
Commit ab8f58ad72c4 ("PM / devfreq: Set min/max_freq when adding the
devfreq device") initializes df-&gt;min/max_freq with the min/max OPP when
the device is added. Later commit f1d981eaecf8 ("PM / devfreq: Use the
available min/max frequency") adds df-&gt;scaling_min/max_freq and the
following to the frequency adjustment code:

  max_freq = MIN(devfreq-&gt;scaling_max_freq, devfreq-&gt;max_freq);

With the current handling of min/max_freq this is incorrect:

Even though df-&gt;max_freq is now initialized to a value != 0 user space
can still set it to 0, in this case max_freq would be 0 instead of
df-&gt;scaling_max_freq as intended. In consequence the frequency adjustment
is not performed:

  if (max_freq &amp;&amp; freq &gt; max_freq) {
	freq = max_freq;

To fix this set df-&gt;min/max freq to the min/max OPP in max/max_freq_store,
when the user passes a value of 0. This also prevents df-&gt;max_freq from
being set below the min OPP when df-&gt;min_freq is 0, and similar for
min_freq. Since it is now guaranteed that df-&gt;min/max_freq can't be 0 the
checks for this case can be removed.

Fixes: f1d981eaecf8 ("PM / devfreq: Use the available min/max frequency")
Signed-off-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Brian Norris &lt;briannorris@chromium.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Drop custom MIN/MAX macros</title>
<updated>2018-10-02T01:16:41+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2018-04-24T19:46:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-obmc-linux/commit/?id=d0e464205b8a1fa21357aad0bbf136500d7e688d'/>
<id>urn:sha1:d0e464205b8a1fa21357aad0bbf136500d7e688d</id>
<content type='text'>
Drop the custom MIN/MAX macros in favour of the standard min/max from
kernel.h

Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: MyungJoo Ham &lt;myungjoo.ham@samsung.com&gt;
</content>
</entry>
</feed>
