<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/opp, branch v5.11</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.11</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.11'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-12-28T05:26:22Z</updated>
<entry>
<title>opp: Call the missing clk_put() on error</title>
<updated>2020-12-28T05:26:22Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-12-28T05:21:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e1d9ca1766f5d95fb881f57b6c4a1ffa63d4648'/>
<id>urn:sha1:0e1d9ca1766f5d95fb881f57b6c4a1ffa63d4648</id>
<content type='text'>
Fix the clock reference counting by calling the missing clk_put() in the
error path.

Cc: v5.10 &lt;stable@vger.kernel.org&gt; # v5.10
Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: fix memory leak in _allocate_opp_table</title>
<updated>2020-12-28T05:25:52Z</updated>
<author>
<name>Quanyang Wang</name>
<email>quanyang.wang@windriver.com</email>
</author>
<published>2020-12-24T10:49:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=976509bb310b913d30577f15b58bdd30effb0542'/>
<id>urn:sha1:976509bb310b913d30577f15b58bdd30effb0542</id>
<content type='text'>
In function _allocate_opp_table, opp_dev is allocated and referenced
by opp_table via _add_opp_dev. But in the case that the subsequent calls
return -EPROBE_DEFER, it will jump to err label and opp_table will be
freed. Then opp_dev becomes an unreferenced object to cause memory leak.
So let's call _remove_opp_dev to do the cleanup.

This fixes the following kmemleak report:

unreferenced object 0xffff000801524a00 (size 128):
  comm "swapper/0", pid 1, jiffies 4294892465 (age 84.616s)
  hex dump (first 32 bytes):
    40 00 56 01 08 00 ff ff 40 00 56 01 08 00 ff ff  @.V.....@.V.....
    b8 52 77 7f 08 00 ff ff 00 3c 4c 00 08 00 ff ff  .Rw......&lt;L.....
  backtrace:
    [&lt;00000000b1289fb1&gt;] kmemleak_alloc+0x30/0x40
    [&lt;0000000056da48f0&gt;] kmem_cache_alloc+0x3d4/0x588
    [&lt;00000000a84b3b0e&gt;] _add_opp_dev+0x2c/0x88
    [&lt;0000000062a380cd&gt;] _add_opp_table_indexed+0x124/0x268
    [&lt;000000008b4c8f1f&gt;] dev_pm_opp_of_add_table+0x20/0x1d8
    [&lt;00000000e5316798&gt;] dev_pm_opp_of_cpumask_add_table+0x48/0xf0
    [&lt;00000000db0a8ec2&gt;] dt_cpufreq_probe+0x20c/0x448
    [&lt;0000000030a3a26c&gt;] platform_probe+0x68/0xd8
    [&lt;00000000c618e78d&gt;] really_probe+0xd0/0x3a0
    [&lt;00000000642e856f&gt;] driver_probe_device+0x58/0xb8
    [&lt;00000000f10f5307&gt;] device_driver_attach+0x74/0x80
    [&lt;0000000004f254b8&gt;] __driver_attach+0x58/0xe0
    [&lt;0000000009d5d19e&gt;] bus_for_each_dev+0x70/0xc8
    [&lt;0000000000d22e1c&gt;] driver_attach+0x24/0x30
    [&lt;0000000001d4e952&gt;] bus_add_driver+0x14c/0x1f0
    [&lt;0000000089928aaa&gt;] driver_register+0x64/0x120

Cc: v5.10 &lt;stable@vger.kernel.org&gt; # v5.10
Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Signed-off-by: Quanyang Wang &lt;quanyang.wang@windriver.com&gt;
[ Viresh: Added the stable tag ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pm-cpufreq'</title>
<updated>2020-12-15T14:24:52Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-12-15T14:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e1f1320fc0a090e7019ad8ec7d81f8a18a5080eb'/>
<id>urn:sha1:e1f1320fc0a090e7019ad8ec7d81f8a18a5080eb</id>
<content type='text'>
* pm-cpufreq: (31 commits)
  cpufreq: Fix cpufreq_online() return value on errors
  cpufreq: Fix up several kerneldoc comments
  cpufreq: stats: Use local_clock() instead of jiffies
  cpufreq: schedutil: Simplify sugov_update_next_freq()
  cpufreq: intel_pstate: Simplify intel_cpufreq_update_pstate()
  cpufreq: arm_scmi: Discover the power scale in performance protocol
  firmware: arm_scmi: Add power_scale_mw_get() interface
  cpufreq: tegra194: Rename tegra194_get_speed_common function
  cpufreq: tegra194: Remove unnecessary frequency calculation
  cpufreq: tegra186: Simplify cluster information lookup
  cpufreq: tegra186: Fix sparse 'incorrect type in assignment' warning
  cpufreq: imx: fix NVMEM_IMX_OCOTP dependency
  cpufreq: vexpress-spc: Add missing MODULE_ALIAS
  cpufreq: scpi: Add missing MODULE_ALIAS
  cpufreq: loongson1: Add missing MODULE_ALIAS
  cpufreq: sun50i: Add missing MODULE_DEVICE_TABLE
  cpufreq: st: Add missing MODULE_DEVICE_TABLE
  cpufreq: qcom: Add missing MODULE_DEVICE_TABLE
  cpufreq: mediatek: Add missing MODULE_DEVICE_TABLE
  cpufreq: highbank: Add missing MODULE_DEVICE_TABLE
  ...
</content>
</entry>
<entry>
<title>Merge branch 'opp/empty' into opp/linux-next</title>
<updated>2020-12-09T05:54:12Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-12-09T05:54:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822'/>
<id>urn:sha1:2c07b0fd9bf6dfb0bdf05aac018e6b3242d60822</id>
<content type='text'>
</content>
</entry>
<entry>
<title>opp: of: Allow empty opp-table with opp-shared</title>
<updated>2020-12-09T05:53:46Z</updated>
<author>
<name>Nicola Mazzucato</name>
<email>nicola.mazzucato@arm.com</email>
</author>
<published>2020-12-08T17:42:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ee70e8c34e37a34f4dc2c8bc06febffd375fac4'/>
<id>urn:sha1:6ee70e8c34e37a34f4dc2c8bc06febffd375fac4</id>
<content type='text'>
The opp binding now allows to have an empty opp table and shared-opp to
still describe that devices share v/f lines.

When initialising an empty opp table, allow such case by:
- treating such conditions with warnings in place of errors
- don't fail on empty table

Signed-off-by: Nicola Mazzucato &lt;nicola.mazzucato@arm.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Allow dev_pm_opp_put_*() APIs to accept NULL opp_table</title>
<updated>2020-12-09T05:51:11Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-11-06T06:46:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7bf8758c955e6272c0f4b2411d7a85abce8fafe'/>
<id>urn:sha1:c7bf8758c955e6272c0f4b2411d7a85abce8fafe</id>
<content type='text'>
This allows the callers to drop the unnecessary checks.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Don't create an OPP table from dev_pm_opp_get_opp_table()</title>
<updated>2020-12-09T05:51:11Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-11-06T05:07:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e77dcb0b732dd355ca594909f6c2085dfc46cde2'/>
<id>urn:sha1:e77dcb0b732dd355ca594909f6c2085dfc46cde2</id>
<content type='text'>
It has been found that some users (like cpufreq-dt and others on LKML)
have abused the helper dev_pm_opp_get_opp_table() to create the OPP
table instead of just finding it, which is the wrong thing to do. This
routine was meant for OPP core's internal working and exposed the whole
functionality by mistake.

Change the scope of dev_pm_opp_get_opp_table() to only finding the
table. The internal helpers _opp_get_opp_table*() are thus renamed to
_add_opp_table*(), dev_pm_opp_get_opp_table_indexed() is removed (as we
don't need the index field for finding the OPP table) and so the only
user, genpd, is updated.

Note that the prototype of _add_opp_table() was already left in opp.h by
mistake when it was removed earlier and so we weren't required to add it
now.

Acked-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Reduce the size of critical section in _opp_kref_release()</title>
<updated>2020-12-09T05:51:11Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-11-19T05:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf1fac943c6341dfed1db1293864c9fcad47bac3'/>
<id>urn:sha1:cf1fac943c6341dfed1db1293864c9fcad47bac3</id>
<content type='text'>
There is a lot of stuff here which can be done outside of the
opp_table-&gt;lock, do that. This helps avoiding a circular dependency
lockdeps around debugfs.

Reported-by: Rob Clark &lt;robdclark@gmail.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM: EM: Add a flag indicating units of power values in Energy Model</title>
<updated>2020-11-10T19:22:00Z</updated>
<author>
<name>Lukasz Luba</name>
<email>lukasz.luba@arm.com</email>
</author>
<published>2020-11-05T12:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c250d50fe2ce627ca9805d9c8ac11cbbf922a4a6'/>
<id>urn:sha1:c250d50fe2ce627ca9805d9c8ac11cbbf922a4a6</id>
<content type='text'>
There are different platforms and devices which might use different scale
for the power values. Kernel sub-systems might need to check if all
Energy Model (EM) devices are using the same scale. Address that issue and
store the information inside EM for each device. Thanks to that they can
be easily compared and proper action triggered.

Suggested-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Quentin Perret &lt;qperret@google.com&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>opp: Don't return opp_dev from _find_opp_dev()</title>
<updated>2020-11-06T07:20:02Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-10-27T06:19:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9e62edac519da71bbc981e4c984fe67729b0d1f3'/>
<id>urn:sha1:9e62edac519da71bbc981e4c984fe67729b0d1f3</id>
<content type='text'>
The caller of _find_opp_dev() only needs to know if the opp_dev is there
in the list or not.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
</feed>
