<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/thermal/cpu_cooling.c, branch linux-4.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-07-27T22:10:02Z</updated>
<entry>
<title>thermal: cpu_cooling: Avoid accessing potentially freed structures</title>
<updated>2017-07-27T22:10:02Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-04-25T10:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b0c642732004c5255e716fc6b15343a9a670e7e5'/>
<id>urn:sha1:b0c642732004c5255e716fc6b15343a9a670e7e5</id>
<content type='text'>
commit 289d72afddf83440117c35d864bf0c6309c1d011 upstream.

After the lock is dropped, it is possible that the cpufreq_dev gets
freed before we call get_level() and that can cause kernel to crash.

Drop the lock after we are done using the structure.

Fixes: 02373d7c69b4 ("thermal: cpu_cooling: fix lockdep problems in cpu_cooling")
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Tested-by: Lukasz Luba &lt;lukasz.luba@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>thermal: cpu_cooling: Check OPP for errors</title>
<updated>2017-03-13T02:06:55Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-02-07T04:10:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ea3217cf91804be6ed9b368ef4ac7911eb1dadc'/>
<id>urn:sha1:3ea3217cf91804be6ed9b368ef4ac7911eb1dadc</id>
<content type='text'>
It is possible for dev_pm_opp_find_freq_exact() to return errors. It was
all fine earlier as dev_pm_opp_get_voltage() had a check within it to
check for invalid OPPs, but dev_pm_opp_put() doesn't have any similar
checks and the callers need to make sure OPP is valid before calling
them.

Also update the later dev_warn_ratelimited() to not print the error
message as the OPP is guaranteed to be valid now.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: cpu_cooling: Replace dev_warn with dev_err</title>
<updated>2017-03-13T02:06:47Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-02-07T04:10:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9aec9082bf3c0fb83020a0f562c9cc8078ac91f1'/>
<id>urn:sha1:9aec9082bf3c0fb83020a0f562c9cc8078ac91f1</id>
<content type='text'>
There isn't much the user can do on seeing these warnings, as the
hardware is actually okay. dev_err suits much better here.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: Fix potential deadlock in cpu_cooling</title>
<updated>2017-03-13T02:06:04Z</updated>
<author>
<name>Matthew Wilcox</name>
</author>
<published>2017-03-10T18:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=088db931e065bd3b159fa2e588eab859ef0d9d23'/>
<id>urn:sha1:088db931e065bd3b159fa2e588eab859ef0d9d23</id>
<content type='text'>
cooling_list_lock is covering not just cpufreq_dev_count, but also the
calls to cpufreq_register_notifier() and cpufreq_unregister_notifier().

Since cooling_list_lock is also used within cpufreq_thermal_notifier(),
lockdep reports a potential deadlock. Fix it by testing the condition
under cooling_list_lock and dropping the lock before calling
cpufreq_register_notifier(). And variable cpufreq_dev_count is removed
at the same time, because it's no longer needed after the fix.

Fixes: ae606089621e ("thermal: convert cpu_cooling to use an IDA")
Reported-and-Tested-by: Russell King &lt;linux@armlinux.org.uk&gt;
Signed-off-by: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux</title>
<updated>2017-03-01T17:54:32Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-03-01T17:54:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=544a068f1f88da89254d2e334a7d4f0dc4ae9ab7'/>
<id>urn:sha1:544a068f1f88da89254d2e334a7d4f0dc4ae9ab7</id>
<content type='text'>
Pull thermal management updates from Zhang Rui:

 - add thermal driver for R-Car Gen3 thermal sensors.

 - add thermal driver for ZTE' zx2967 family thermal sensors.

 - convert thermal ID allocation from IDR to IDA.

 - fix a possible NULL dereference in imx thermal driver.

 - fix a ti-soc-thermal driver dependency issue so that critical thermal
   control is still available when CPU_THERMAL is not defined.

 - update binding information for QorIQ thermal driver.

 - a couple of cleanups in thermal core, intel_powerclamp, exynos,
   dra752-thermal, mtk-thermal driver.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
  powerpc/mpc85xx: Update TMU device tree node for T1023/T1024
  powerpc/mpc85xx: Update TMU device tree node for T1040/T1042
  dt-bindings: Update QorIQ TMU thermal bindings
  thermal: mtk_thermal: Staticise a number of data variables
  thermal: arm: dra752: Remove all TSHUT related definitions
  thermal: arm: dra752: Remove TSHUT configuration
  thermal: ti-soc-thermal: Remove CPU_THERMAL Dependency from TI_THERMAL
  thermal: imx: Fix possible NULL dereference.
  thermal: exynos: Remove parsing unused samsung,tmu_cal_mode property
  thermal: zx2967: add thermal driver for ZTE's zx2967 family
  thermal: use cpumask_var_t for on-stack cpu masks
  dt: bindings: add documentation for zx2967 family thermal sensor
  thermal/intel_powerclamp: Remove set-but-not-used variables
  thermal: rcar_gen3_thermal: Add R-Car Gen3 thermal driver
  thermal: rcar_gen3_thermal: Document the R-Car Gen3
  thermal: convert devfreq_cooling to use an IDA
  thermal: convert cpu_cooling to use an IDA
  thermal: convert clock cooling to use an IDA
  thermal core: convert ID allocation to IDA
</content>
</entry>
<entry>
<title>Merge branches 'thermal-core', 'thermal-soc', 'thermal-intel' and 'ida-conversion' into next</title>
<updated>2017-02-22T07:35:06Z</updated>
<author>
<name>Zhang Rui</name>
</author>
<published>2017-02-22T07:35:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6fefe19f583625ca4ea3ecc9128baa51c31c60a4'/>
<id>urn:sha1:6fefe19f583625ca4ea3ecc9128baa51c31c60a4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>thermal: use cpumask_var_t for on-stack cpu masks</title>
<updated>2017-02-10T08:40:47Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2017-02-02T14:46:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9cc34a6e1a8e7d26d243c54fa6cef93556d44f2'/>
<id>urn:sha1:d9cc34a6e1a8e7d26d243c54fa6cef93556d44f2</id>
<content type='text'>
Putting a bare cpumask structure on the stack produces a warning on
large SMP configurations:

drivers/thermal/cpu_cooling.c: In function 'cpufreq_state2power':
drivers/thermal/cpu_cooling.c:644:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=]
drivers/thermal/cpu_cooling.c: In function '__cpufreq_cooling_register':
drivers/thermal/cpu_cooling.c:898:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=]

The recommended workaround is to use cpumask_var_t, which behaves just like
a normal cpu mask in most cases, but turns into a dynamic allocation
when CONFIG_CPUMASK_OFFSTACK is set.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Update OPP users to put reference</title>
<updated>2017-01-30T08:22:21Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2017-01-23T04:41:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a31d9d94297b1ecae3012069d35d78c959693c2'/>
<id>urn:sha1:8a31d9d94297b1ecae3012069d35d78c959693c2</id>
<content type='text'>
This patch updates dev_pm_opp_find_freq_*() routines to get a reference
to the OPPs returned by them.

Also updates the users of dev_pm_opp_find_freq_*() routines to call
dev_pm_opp_put() after they are done using the OPPs.

As it is guaranteed the that OPPs wouldn't get freed while being used,
the RCU read side locking present with the users isn't required anymore.
Drop it as well.

This patch also updates all users of devfreq_recommended_opp() which was
returning an OPP received from the OPP core.

Note that some of the OPP core routines have gained
rcu_read_{lock|unlock}() calls, as those still use RCU specific APIs
within them.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Reviewed-by: Chanwoo Choi &lt;cw00.choi@samsung.com&gt; [Devfreq]
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: convert cpu_cooling to use an IDA</title>
<updated>2017-01-04T04:47:28Z</updated>
<author>
<name>Matthew Wilcox</name>
</author>
<published>2016-12-21T17:47:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ae606089621ef0349402cfcbeca33a82abbd0fd0'/>
<id>urn:sha1:ae606089621ef0349402cfcbeca33a82abbd0fd0</id>
<content type='text'>
thermal cpu cooling does not use the ability to look up pointers by ID,
so convert it from using an IDR to the more space-efficient IDA.

The cooling_cpufreq_lock was being used to protect cpufreq_dev_count as
well as the IDR.  Rather than keep the mutex to protect a single integer,
I expanded the scope of cooling_list_lock to also cover cpufreq_dev_count.
We could also convert cpufreq_dev_count into an atomic.

Signed-off-by: Matthew Wilcox &lt;mawilcox@microsoft.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: cpu_cooling: Fix wrong comment call function name</title>
<updated>2016-09-27T01:38:17Z</updated>
<author>
<name>Hugh Kang</name>
</author>
<published>2016-09-07T00:35:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0744f1306f6b0ffc2c6bd68c1edf688b74fa8779'/>
<id>urn:sha1:0744f1306f6b0ffc2c6bd68c1edf688b74fa8779</id>
<content type='text'>
The last_load is updated not cpufreq_get_actual_power() function call
but cpufreq_get_requested_power() function call.

Signed-off-by: Inhyuk Kang &lt;hugh.kang@lge.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Acked-by: Javi Merino &lt;javi.merino@arm.com&gt;
Acked-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
</feed>
