From: Lukasz Majewski <l.majewski@samsung.com>
To: Eduardo Valentin <edubezval@gmail.com>, Zhang Rui <rui.zhang@intel.com>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Linux PM list <linux-pm@vger.kernel.org>,
Vincenzo Frascino <vincenzo.frascino@st.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Lukasz Majewski <l.majewski@majess.pl>,
Nobuhiro Iwamatsu <iwamatsu@nigauri.org>,
Mikko Perttunen <mperttunen@nvidia.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
Lukasz Majewski <l.majewski@samsung.com>
Subject: [PATCH 0/8] thermal:cpu cooling:fix: Provide thermal core fixes with deferred probe for several drivers
Date: Thu, 13 Nov 2014 18:02:37 +0100 [thread overview]
Message-ID: <1415898165-27406-1-git-send-email-l.majewski@samsung.com> (raw)
In-Reply-To: <1411547232-21493-1-git-send-email-l.majewski@samsung.com>
Presented fixes are a response for problem described below:
http://thread.gmane.org/gmane.linux.kernel/1793821/match=thermal+core+fix+initialize+max_state+variable+0
In short - it turned out that two trivial fixes (included in this patch set)
require support for deferred probe in thermal drivers.
This situation shows up when CPU frequency reduction is used as a thermal cooling
device for a thermal zone.
It happens that during initialization, the call to thermal probe will be executed
before cpufreq probe (it can be observed at ./drivers/Makefile).
In such a situation thermal will not be properly configured until cpufreq policy
is setup.
In the current code (without included fixes) there is a time window in which thermal
can try to use not configured cpufreq and possibly crash the system.
Proposed solution was based on the code already available in the imx_thermal.c file.
/db8500_thermal.c: -> NOT NEEDED
/intel_powerclamp.c: -> NOT NEEDED - INTEL (x86)
/intel_powerclamp.c: -> NOT NEEDED - INTEL (x86)
/ti-soc-thermal/ti-bandgap.c: -> FIXED [omap2plus_defconfig]
/dove_thermal.c: -> NOT NEEDED - CPU_COOLING NOT AVAILABLE
[dove_defconfig]
/spear_thermal.c: -> FIXED [spear3xx_defconfig]
/samsung/exynos_tmu.c: -> NOT NEEDED (nasty hack - will be reworked in later patches)
/imx_thermal.c: -> OK (deferred probe already in place)
/int340x_thermal/int3402_thermal.c: -> NOT NEEDED - ACPI x86 - Intel specific
/int340x_thermal/int3400_thermal.c: -> NOT NEEDED - ACPI x86 - Intel specific
/tegra_soctherm.c: -> FIXED [tegra_defconfig]
/kirkwood_thermal.c: -> FIXED [multi_v5_defconfig]
/armada_thermal.c: -> FIXED [multi_v7_defconfig]
/rcar_thermal.c: -> FIXED [shmobile_defconfig]
/db8500_cpufreq_cooling.c: -> OK (deferred probe already in place) [multi_v7_defconfig]
/st/st_thermal_syscfg.c: -> NOT NEEDED (Those two are enabled by e.g. ARMADA)
/st/st_thermal_memmap.c:
I only possess Exynos boards and Beagle Bone Black, so I'd be grateful for
testing proposed solution on other boards. The posted code is compile tested.
This code applies on Eduardo's ti-soc-thermal-next tree:
SHA1: 208a97042d66d9bfbcfab0d4a00c9fe317bb73d3
Lukasz Majewski (8):
thermal:cpu cooling:armada: Provide deferred probing for armada driver
thermal:cpu cooling:kirkwood: Provide deferred probing for kirkwood
driver
thermal:cpu cooling:rcar: Provide deferred probing for rcar driver
thermal:cpu cooling:spear: Provide deferred probing for spear driver
thermal:cpu cooling:tegra: Provide deferred probing for tegra driver
thermal:cpu cooling:ti: Provide deferred probing for ti drivers
thermal:core:fix: Initialize the max_state variable to 0
thermal:core:fix: Check return code of the ->get_max_state() callback
drivers/thermal/armada_thermal.c | 7 +++++++
drivers/thermal/kirkwood_thermal.c | 7 +++++++
drivers/thermal/rcar_thermal.c | 7 +++++++
drivers/thermal/spear_thermal.c | 7 +++++++
drivers/thermal/tegra_soctherm.c | 7 +++++++
drivers/thermal/thermal_core.c | 8 +++++---
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 7 +++++++
7 files changed, 47 insertions(+), 3 deletions(-)
--
2.0.0.rc2
next prev parent reply other threads:[~2014-11-13 17:03 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 8:27 [PATCH 0/3] thermal: fix: Various fixes for thermal subsystem Lukasz Majewski
2014-09-24 8:27 ` [PATCH 1/3] thermal: step_wise: fix: Prevent from binary overflow when trend is dropping Lukasz Majewski
2014-10-02 21:13 ` Eduardo Valentin
2014-10-03 7:26 ` Lukasz Majewski
2014-10-09 3:14 ` Zhang Rui
2014-09-24 8:27 ` [PATCH 2/3] thermal: core: fix: Initialize the max_state variable to 0 Lukasz Majewski
2014-10-02 22:26 ` Eduardo Valentin
2014-10-03 8:26 ` Lukasz Majewski
2014-10-06 18:01 ` Eduardo Valentin
2014-09-24 8:27 ` [PATCH 3/3] thermal: core: fix: Check return code of the ->get_max_state() callback Lukasz Majewski
2014-10-02 22:24 ` Eduardo Valentin
2014-10-03 10:40 ` Lukasz Majewski
2014-10-09 3:15 ` Zhang Rui
2014-10-09 16:47 ` Lukasz Majewski
2014-10-02 14:40 ` [PATCH 0/3] thermal: fix: Various fixes for thermal subsystem Lukasz Majewski
2014-11-13 17:02 ` Lukasz Majewski [this message]
2014-11-13 17:02 ` [PATCH 1/8] thermal:cpu cooling:armada: Provide deferred probing for armada driver Lukasz Majewski
2014-11-13 17:02 ` [PATCH 2/8] thermal:cpu cooling:kirkwood: Provide deferred probing for kirkwood driver Lukasz Majewski
2014-11-13 17:02 ` [PATCH 3/8] thermal:cpu cooling:rcar: Provide deferred probing for rcar driver Lukasz Majewski
2014-11-13 17:02 ` [PATCH 4/8] thermal:cpu cooling:spear: Provide deferred probing for spear driver Lukasz Majewski
2014-11-13 17:02 ` [PATCH 5/8] thermal:cpu cooling:tegra: Provide deferred probing for tegra driver Lukasz Majewski
2014-11-14 10:47 ` Mikko Perttunen
2014-11-14 11:24 ` Lukasz Majewski
2014-11-17 11:57 ` Thierry Reding
2014-11-17 12:51 ` Lukasz Majewski
2014-11-17 13:18 ` Thierry Reding
2014-11-17 11:43 ` Thierry Reding
2014-11-17 11:50 ` Lukasz Majewski
2014-11-17 12:01 ` Thierry Reding
2014-11-17 13:02 ` Lukasz Majewski
2014-11-17 12:51 ` Mikko Perttunen
2014-11-17 13:08 ` Thierry Reding
2014-11-17 13:24 ` Mikko Perttunen
2014-11-17 11:40 ` Thierry Reding
2014-11-13 17:02 ` [PATCH 6/8] thermal:cpu cooling:ti: Provide deferred probing for ti drivers Lukasz Majewski
2014-11-20 19:00 ` Eduardo Valentin
2014-11-13 17:02 ` [PATCH 7/8] thermal:core:fix: Initialize the max_state variable to 0 Lukasz Majewski
2014-11-13 17:02 ` [PATCH 8/8] thermal:core:fix: Check return code of the ->get_max_state() callback Lukasz Majewski
2014-11-18 10:16 ` [PATCH v2] " Lukasz Majewski
2014-11-21 18:08 ` Eduardo Valentin
2014-11-24 10:38 ` Lukasz Majewski
2014-11-24 11:00 ` Viresh Kumar
2014-11-24 14:24 ` Lukasz Majewski
2014-11-25 10:46 ` Viresh Kumar
2014-11-24 18:02 ` Eduardo Valentin
2014-11-24 20:28 ` Lukasz Majewski
2014-11-20 18:54 ` [PATCH 0/8] thermal:cpu cooling:fix: Provide thermal core fixes with deferred probe for several drivers Eduardo Valentin
2014-11-21 8:33 ` Lukasz Majewski
2014-11-21 2:47 ` Eduardo Valentin
2014-11-21 16:28 ` Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1415898165-27406-1-git-send-email-l.majewski@samsung.com \
--to=l.majewski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=edubezval@gmail.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=gnurou@gmail.com \
--cc=iwamatsu@nigauri.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=l.majewski@majess.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=rui.zhang@intel.com \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=vincenzo.frascino@st.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®