From: Eduardo Valentin <eduardo.valentin@ti.com>
To: Lukasz Majewski <l.majewski@samsung.com>
Cc: Eduardo Valentin <eduardo.valentin@ti.com>,
Kukjin Kim <kgene.kim@samsung.com>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
Zhang Rui <rui.zhang@intel.com>,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
Amit Daniel Kachhap <amit.kachhap@linaro.org>,
Tomasz Figa <t.figa@samsung.com>,
Sachin Kamat <sachin.kamat@linaro.org>,
Myungjoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [PATCH v2 4/4] ARM:TMU:fix: Avoid lockup when first frequency table entry is CPUFREQ_ENTRY_INVALID
Date: Thu, 25 Apr 2013 11:39:12 -0400 [thread overview]
Message-ID: <51794E20.9010107@ti.com> (raw)
In-Reply-To: <20130425172246.2143525e@amdc308.digital.local>
On 25-04-2013 11:22, Lukasz Majewski wrote:
> Hi Eduardo,
>
>> Lukasz,
>>
>> On 25-04-2013 08:30, Lukasz Majewski wrote:
>>> With the while loop, when i=0 and first entry in the frequency
>>> table is CPUFREQ_ENTRY_INVALID, the code results in an endless loop
>>> (since i is not incremented).
>>>
>>> To fix this problem the for loop has been chosen. Incrementing i in
>>> the for end block solves the problem.
>>>
>>> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
>>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
>>> ---
>>> Changes for v2:
>>> - New in v2
>>
>> This patch wont apply on Rui's tree.
>>
>> I believe this has been already fixed on Rui's tree (next branch).
>> Could you please check if the commit below fix your issue:
>> git.kernel.org/cgit/linux/kernel/git/rzhang/linux.git/commit/?h=thermal&id=fc35b35cbe24ef021ea9acfba21e54da958df747
>>
>> commit fc35b35cbe24ef021ea9acfba21e54da958df747
>> Author: Zhang Rui <rui.zhang@intel.com>
>> Date: Fri Feb 8 13:09:32 2013 +0800
>>
>> Thermal: cpufreq cooling: fix parsing per_cpu
>> cpufreq_frequency_table
>>
>
> Thanks for pointing out. It seems, that this function fixes this
> problem.
OK.
>
> As a side note, is this problem fixed at stable kernels?
Good question, probably not!
>
>>
>>
>>> ---
>>> drivers/thermal/cpu_cooling.c | 3 +--
>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/thermal/cpu_cooling.c
>>> b/drivers/thermal/cpu_cooling.c index 8dc44cb..df79f5e8 100644
>>> --- a/drivers/thermal/cpu_cooling.c
>>> +++ b/drivers/thermal/cpu_cooling.c
>>> @@ -124,7 +124,7 @@ static unsigned int get_cpu_frequency(unsigned
>>> int cpu, unsigned long level) if (!table)
>>> return ret;
>>>
>>> - while (table[i].frequency != CPUFREQ_TABLE_END) {
>>> + for (; table[i].frequency != CPUFREQ_TABLE_END; i++) {
>>> if (table[i].frequency == CPUFREQ_ENTRY_INVALID)
>>> continue;
>>>
>>> @@ -138,7 +138,6 @@ static unsigned int get_cpu_frequency(unsigned
>>> int cpu, unsigned long level) /*return if level matched and table
>>> in descending order*/ if (descend && i == level)
>>> return table[i].frequency;
>>> - i++;
>>> }
>>> i--;
>>>
>>>
>
>
>
next prev parent reply other threads:[~2013-04-25 15:39 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 16:38 [PATCH 0/6] thermal:exynos4: Thermal Measurement Unit fixes for Samsung SoCs Lukasz Majewski
2013-04-19 16:38 ` [PATCH 1/6] clk:exynos4:TMU Thermal Measurement Unit clock added to common clock framework Lukasz Majewski
2013-04-19 16:38 ` [PATCH 2/6] thermal:exynos4: TMU Common clock framework support for TMU (Thermal Monitoring Unit) Lukasz Majewski
2013-04-19 17:26 ` Eduardo Valentin
2013-04-19 18:08 ` Sachin Kamat
2013-04-23 6:17 ` Lukasz Majewski
2013-04-23 7:15 ` Sachin Kamat
2013-04-23 8:06 ` Lukasz Majewski
2013-04-23 8:42 ` Sachin Kamat
2013-04-19 16:38 ` [PATCH 3/6] thermal:exynos4: TMU device tree support for Exynos4412 targets Lukasz Majewski
2013-04-19 17:28 ` Eduardo Valentin
2013-04-23 6:18 ` Lukasz Majewski
2013-04-22 4:19 ` Sachin Kamat
2013-04-23 6:19 ` Lukasz Majewski
2013-04-19 16:38 ` [PATCH 4/6] thermal: Support for TMU regulator defined at device tree Lukasz Majewski
2013-04-19 17:23 ` Eduardo Valentin
2013-04-23 6:23 ` Lukasz Majewski
2013-04-23 15:01 ` Eduardo Valentin
2013-04-19 16:38 ` [PATCH 5/6] thermal:exynos4: Enable support for Exynos4412 SoCs Lukasz Majewski
2013-04-19 18:11 ` Sachin Kamat
2013-04-19 18:21 ` Tomasz Figa
2013-04-19 18:26 ` Sachin Kamat
2013-04-22 6:25 ` amit kachhap
2013-04-22 6:35 ` Lukasz Majewski
2013-04-22 6:40 ` Sachin Kamat
2013-04-19 16:38 ` [PATCH 6/6] thermal:exynos4: Add documentation for Exynos SoC thermal bindings Lukasz Majewski
2013-04-22 4:55 ` Sachin Kamat
2013-04-23 6:25 ` Lukasz Majewski
2013-04-23 7:09 ` Sachin Kamat
2013-04-22 16:51 ` [PATCH 0/6] thermal:exynos4: Thermal Measurement Unit fixes for Samsung SoCs Kukjin Kim
2013-04-23 6:26 ` Lukasz Majewski
2013-04-23 7:19 ` Sachin Kamat
2013-04-23 8:01 ` Lukasz Majewski
2013-04-25 12:30 ` [PATCH v2 0/4] Thermal:exynos: Thermal Measurement Unit fix and Samsung SoCs support Lukasz Majewski
2013-04-25 12:30 ` [PATCH v2 1/4] ARM: dts: thermal: exynos4: TMU device tree support for Exynos4412 targets Lukasz Majewski
2013-04-25 15:45 ` Eduardo Valentin
2013-04-29 4:57 ` amit daniel kachhap
2013-04-25 12:30 ` [PATCH v2 2/4] Thermal: exynos: Support for TMU regulator defined at device tree Lukasz Majewski
2013-04-25 13:09 ` amit daniel kachhap
2013-04-25 13:29 ` Lukasz Majewski
2013-04-25 15:44 ` Eduardo Valentin
2013-04-25 16:29 ` Lukasz Majewski
2013-04-27 0:50 ` Zhang Rui
2013-04-29 4:38 ` amit daniel kachhap
2013-04-29 4:35 ` amit daniel kachhap
2013-04-25 12:30 ` [PATCH v2 3/4] ARM: dts: thermal: exynos4: Add documentation for Exynos SoC thermal bindings Lukasz Majewski
2013-04-25 15:46 ` Eduardo Valentin
2013-04-29 5:01 ` amit daniel kachhap
2013-04-25 12:30 ` [PATCH v2 4/4] ARM:TMU:fix: Avoid lockup when first frequency table entry is CPUFREQ_ENTRY_INVALID Lukasz Majewski
2013-04-25 15:11 ` Eduardo Valentin
2013-04-25 15:22 ` Lukasz Majewski
2013-04-25 15:39 ` Eduardo Valentin [this message]
2013-04-25 15:39 ` [PATCH v2 0/4] Thermal:exynos: Thermal Measurement Unit fix and Samsung SoCs support Eduardo Valentin
2013-04-25 16:28 ` Lukasz Majewski
2013-04-26 5:05 ` Sachin Kamat
2013-04-26 6:39 ` Lukasz Majewski
2013-04-26 6:45 ` Sachin Kamat
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=51794E20.9010107@ti.com \
--to=eduardo.valentin@ti.com \
--cc=amit.kachhap@linaro.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=l.majewski@samsung.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rui.zhang@intel.com \
--cc=sachin.kamat@linaro.org \
--cc=t.figa@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.