<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/devfreq, branch v5.19</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.19</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.19'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-07-07T19:32:26Z</updated>
<entry>
<title>PM / devfreq: exynos-bus: Fix NULL pointer dereference</title>
<updated>2022-07-07T19:32:26Z</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-07-01T13:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8934e4e348915caac54085c01fd9d04fa16134a'/>
<id>urn:sha1:c8934e4e348915caac54085c01fd9d04fa16134a</id>
<content type='text'>
Fix exynos-bus NULL pointer dereference by correctly using the local
generated freq_table to output the debug values instead of using the
profile freq_table that is not used in the driver.

Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Fixes: b5d281f6c16d ("PM / devfreq: Rework freq_table to be local to devfreq struct")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Acked-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: passive: revert an editing accident in SPDX-License line</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Lukas Bulwahn</name>
<email>lukas.bulwahn@gmail.com</email>
</author>
<published>2022-06-28T05:34:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f08fe6fcbe13f83558ecccc4acaf5af3dce71a1f'/>
<id>urn:sha1:f08fe6fcbe13f83558ecccc4acaf5af3dce71a1f</id>
<content type='text'>
Commit 26984d9d581e ("PM / devfreq: passive: Keep cpufreq_policy for
possible cpus") reworked governor_passive.c, and accidently added a
tab in the first line, i.e., the SPDX-License-Identifier line.

The checkpatch script warns with the SPDX_LICENSE_TAG warning, and hence
pointed this issue out while investigating checkpatch warnings.

Revert this editing accident. No functional change.

Signed-off-by: Lukas Bulwahn &lt;lukas.bulwahn@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Fix kernel warning with cpufreq passive register fail</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-06-19T22:29:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=82c66d2bbbeda9e493487e7413769087a0b46250'/>
<id>urn:sha1:82c66d2bbbeda9e493487e7413769087a0b46250</id>
<content type='text'>
Remove cpufreq_passive_unregister_notifier from
cpufreq_passive_register_notifier in case of error as devfreq core
already call unregister on GOV_START fail.

This fix the kernel always printing a WARN on governor PROBE_DEFER as
cpufreq_passive_unregister_notifier is called two times and return
error on the second call as the cpufreq is already unregistered.

Fixes: a03dacb0316f ("PM / devfreq: Add cpu based scaling support to passive governor")
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Rework freq_table to be local to devfreq struct</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Christian Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-06-19T22:03:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5d281f6c16dd432b618bdfd36ddba1a58d5b603'/>
<id>urn:sha1:b5d281f6c16dd432b618bdfd36ddba1a58d5b603</id>
<content type='text'>
On a devfreq PROBE_DEFER, the freq_table in the driver profile struct,
is never reset and may be leaved in an undefined state.

This comes from the fact that we store the freq_table in the driver
profile struct that is commonly defined as static and not reset on
PROBE_DEFER.
We currently skip the reinit of the freq_table if we found
it's already defined since a driver may declare his own freq_table.

This logic is flawed in the case devfreq core generate a freq_table, set
it in the profile struct and then PROBE_DEFER, freeing the freq_table.
In this case devfreq will found a NOT NULL freq_table that has been
freed, skip the freq_table generation and probe the driver based on the
wrong table.

To fix this and correctly handle PROBE_DEFER, use a local freq_table and
max_state in the devfreq struct and never modify the freq_table present
in the profile struct if it does provide it.

Fixes: 0ec09ac2cebe ("PM / devfreq: Set the freq_table of devfreq device")
Cc: stable@vger.kernel.org
Signed-off-by: Christian Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: exynos-ppmu: Fix refcount leak in of_get_devfreq_events</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Miaoqian Lin</name>
<email>linmq006@gmail.com</email>
</author>
<published>2022-05-26T08:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f44b799603a9b5d2e375b0b2d54dd0b791eddfc2'/>
<id>urn:sha1:f44b799603a9b5d2e375b0b2d54dd0b791eddfc2</id>
<content type='text'>
of_get_child_by_name() returns a node pointer with refcount
incremented, we should use of_node_put() on it when done.
This function only calls of_node_put() in normal path,
missing it in error paths.
Add missing of_node_put() to avoid refcount leak.

Fixes: f262f28c1470 ("PM / devfreq: event: Add devfreq_event class")
Signed-off-by: Miaoqian Lin &lt;linmq006@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: passive: Use HZ_PER_KHZ macro in units.h</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Yicong Yang</name>
<email>yangyicong@hisilicon.com</email>
</author>
<published>2022-06-10T07:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=20e6c3cc90c0a86dba659dd9e7d60b429d88746d'/>
<id>urn:sha1:20e6c3cc90c0a86dba659dd9e7d60b429d88746d</id>
<content type='text'>
HZ macros has been centralized in units.h since [1]. Use it to avoid
duplicated definition.

[1] commit e2c77032fcbe ("units: add the HZ macros")

Signed-off-by: Yicong Yang &lt;yangyicong@hisilicon.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Fix cpufreq passive unregister erroring on PROBE_DEFER</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Christian 'Ansuel' Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-06-14T23:09:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0cca7e8dcfa9e6fe7ba697e534a732571f1689d0'/>
<id>urn:sha1:0cca7e8dcfa9e6fe7ba697e534a732571f1689d0</id>
<content type='text'>
With the passive governor, the cpu based scaling can PROBE_DEFER due to
the fact that CPU policy are not ready.
The cpufreq passive unregister notifier is called both from the
GOV_START errors and for the GOV_STOP and assume the notifier is
successfully registred every time. With GOV_START failing it's wrong to
loop over each possible CPU since the register path has failed for
some CPU policy not ready. Change the logic and unregister the notifer
based on the current allocated parent_cpu_data list to correctly handle
errors and the governor unregister path.

Fixes: a03dacb0316f ("PM / devfreq: Add cpu based scaling support to passive governor")
Signed-off-by: Christian 'Ansuel' Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Mute warning on governor PROBE_DEFER</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Christian 'Ansuel' Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-06-14T23:09:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e52b045fe07d7874474665c843befa7521853234'/>
<id>urn:sha1:e52b045fe07d7874474665c843befa7521853234</id>
<content type='text'>
Don't print warning when a governor PROBE_DEFER as it's not a real
GOV_START fail.

Fixes: a03dacb0316f ("PM / devfreq: Add cpu based scaling support to passive governor")
Signed-off-by: Christian 'Ansuel' Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: Fix kernel panic with cpu based scaling to passive gov</title>
<updated>2022-06-29T20:11:17Z</updated>
<author>
<name>Christian 'Ansuel' Marangi</name>
<email>ansuelsmth@gmail.com</email>
</author>
<published>2022-06-14T11:06:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=57e00b40033a376de3f3cf0bb9bf7590d2dd679d'/>
<id>urn:sha1:57e00b40033a376de3f3cf0bb9bf7590d2dd679d</id>
<content type='text'>
The cpufreq passive register notifier can PROBE_DEFER and the devfreq
struct is freed and then reallocaed on probe retry.
The current logic assume that the code can't PROBE_DEFER so the devfreq
struct in the this variable in devfreq_passive_data is assumed to be
(if already set) always correct.
This cause kernel panic as the code try to access the wrong address.
To correctly handle this, update the this variable in
devfreq_passive_data to the devfreq reallocated struct.

Fixes: a03dacb0316f ("PM / devfreq: Add cpu based scaling support to passive governor")
Signed-off-by: Christian 'Ansuel' Marangi &lt;ansuelsmth@gmail.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
</content>
</entry>
<entry>
<title>PM / devfreq: passive: Return non-error when not-supported event is required</title>
<updated>2022-05-19T17:32:19Z</updated>
<author>
<name>Chanwoo Choi</name>
<email>cw00.choi@samsung.com</email>
</author>
<published>2022-05-19T01:07:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42d2607d91c4ec37ea1970899c2d614824f3014b'/>
<id>urn:sha1:42d2607d91c4ec37ea1970899c2d614824f3014b</id>
<content type='text'>
Each devfreq governor specifies the supported governor event
such as GOV_START and GOV_STOP. When not-supported event is required,
just return non-error. But, commit ce9a0d88d97a ("PM / devfreq: Add
cpu based scaling support to passive governor") returned the error
value. So that return non-error value when not-supported event is required.

Fixes: ce9a0d88d97a ("PM / devfreq: Add cpu based scaling support to passive governor")
Reported-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Signed-off-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
