Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Kukjin Kim <kgene@kernel.org>,
	'Tobias Jakobi' <tjakobi@math.uni-bielefeld.de>,
	linux-samsung-soc@vger.kernel.org, thomas.ab@samsung.com
Cc: dianders@chromium.org
Subject: Re: [PATCH] clocksource: exynos_mct: fix exynos4_mct_write
Date: Tue, 02 Dec 2014 16:21:17 +0100	[thread overview]
Message-ID: <547DD8ED.6050403@linaro.org> (raw)
In-Reply-To: <025001d00c22$77a6b5e0$66f421a0$@kernel.org>

On 11/29/2014 11:18 PM, Kukjin Kim wrote:
> Tobias Jakobi wrote:
>>
>> EXYNOS4_MCT_L_MASK is defined as 0xffffff00, so applying this bitmask
>> produces a number outside the range 0x00 to 0xff, which always results
>> in execution of the default switch statement.
>>
>> Obviously this is wrong and git history shows that the bitmask inversion
>> was incorrectly set during a refactoring of the MCT code.
>>
>> Fix this by putting the inversion at the correct position again.
>>
>> Reported-by: GP Orcullo <kinsamanka@gmail.com>
>> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
>
> + Daniel, Thomas,
>
> adding Doug's review tag from previous his reply.
>
> Reviewed-by: Doug Anderson <dianders@chromium.org>
>
> And
>
> Acked-by: Kukjin Kim <kgene.kim@samsung.com>
>
> Daniel,
>
> Since this is obvious fix, can you please pick into your tree?
> If any problem, please kindly let me know.

Hi Kukjin,

the patch is my tree for a 3.18 fix.

Added the stable@ also in the Cc list.

Thanks
  -- Daniel

>> ---
>>   drivers/clocksource/exynos_mct.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c
>> index 9403061..83564c9 100644
>> --- a/drivers/clocksource/exynos_mct.c
>> +++ b/drivers/clocksource/exynos_mct.c
>> @@ -97,8 +97,8 @@ static void exynos4_mct_write(unsigned int value, unsigned long offset)
>>   	writel_relaxed(value, reg_base + offset);
>>
>>   	if (likely(offset >= EXYNOS4_MCT_L_BASE(0))) {
>> -		stat_addr = (offset & ~EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
>> -		switch (offset & EXYNOS4_MCT_L_MASK) {
>> +		stat_addr = (offset & EXYNOS4_MCT_L_MASK) + MCT_L_WSTAT_OFFSET;
>> +		switch (offset & ~EXYNOS4_MCT_L_MASK) {
>>   		case MCT_L_TCON_OFFSET:
>>   			mask = 1 << 3;		/* L_TCON write status */
>>   			break;
>> --
>> 2.0.4
>


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

      reply	other threads:[~2014-12-02 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  1:37 [PATCH] clocksource: exynos_mct: fix exynos4_mct_write Tobias Jakobi
2014-10-22 15:57 ` Doug Anderson
2014-10-22 16:12   ` Tobias Jakobi
2014-10-22 18:00     ` Chirantan Ekbote
2014-11-29 15:42       ` Tobias Jakobi
2014-11-29 22:14         ` Kukjin Kim
2014-11-29 22:18 ` Kukjin Kim
2014-12-02 15:21   ` Daniel Lezcano [this message]

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=547DD8ED.6050403@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=dianders@chromium.org \
    --cc=kgene@kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=thomas.ab@samsung.com \
    --cc=tjakobi@math.uni-bielefeld.de \
    /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