public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>,
	linux-kernel@vger.kernel.org
Cc: Guenter Roeck <linux@roeck-us.net>, Kukjin Kim <kgene@kernel.org>,
	Wim Van Sebroeck <wim@iguana.be>,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-watchdog@vger.kernel.org,
	Chanwoo Choi <cw00.choi@samsung.com>
Subject: Re: [RFC PATCH] watchdog: s3c2410_wdt: Add max and min timeout values
Date: Thu, 03 Mar 2016 11:30:55 +0900	[thread overview]
Message-ID: <56D7A1DF.9030805@samsung.com> (raw)
In-Reply-To: <56D79E1D.3030302@osg.samsung.com>

On 03.03.2016 11:14, Javier Martinez Canillas wrote:
> Hello Krzysztof,
> 
> On 03/02/2016 09:21 PM, Krzysztof Kozlowski wrote:
>> On 03.03.2016 02:30, Javier Martinez Canillas wrote:
> 
> [snip]
> 
>>>>>
>>>>> +    wdt->wdt_device.min_timeout = 1;
>>>>> +    wdt->wdt_device.max_timeout = s3c2410wdt_max_timeout(wdt->clock);
>>>>
>>>> Can the frequency of clock change? E.g. with devfreq? No problem if it
>>>> goes lower but if it gets higher than initial, then the problem will
>>>> appear again.
>>>>
> 
> I think both cases are problematic since low scaling will meant that the
> watchdog will support a bigger timeout than what was set as maximum (this
> will be a regression) and going up will mean that the maximum timeout is
> bigger than what the watchdog supports (the same issue without this patch).

Yes, both cases are bad.

>> The problem will be more severe if the watchdog got configured on 50 MHz
>> and then devfreq bumps the clock to 100 MHz...
>>
> 
> So, what do you propose? We could for example set a maximum timeout on
> probe
> as $SUBJECT do and also update the maximum timeout again on the
> .set_timeout
> callback in case the clock rate changed. 

Or print warning and don't care... :)

> I think that is kind of hacky
> but I
> can't think of another way to guard about the frequency being changed.

First of all your patch does not introduce any kind of regression on its
own. Since we are at the topic of watchdog I am just looking for doing
this properly. We can merge the patches now and fix stuff later.

Second, I think there won't be any issues with current mainline code
(and devfreq). I don't care about out of tree code.

Third, it would be good to confirm that watchdog clock really changes
frequency with devfreq...

BR,
KRzysztof

  reply	other threads:[~2016-03-03  2:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 16:45 [RFC PATCH] watchdog: s3c2410_wdt: Add max and min timeout values Javier Martinez Canillas
2016-03-01 23:44 ` Krzysztof Kozlowski
2016-03-02 16:16   ` Guenter Roeck
2016-03-02 17:30   ` Javier Martinez Canillas
2016-03-03  0:21     ` Krzysztof Kozlowski
2016-03-03  2:14       ` Javier Martinez Canillas
2016-03-03  2:30         ` Krzysztof Kozlowski [this message]
2016-03-03  4:50         ` Guenter Roeck
2016-03-03 11:55           ` Javier Martinez Canillas
2016-03-03 12:26             ` Krzysztof Kozlowski
2016-03-04  5:32               ` Guenter Roeck
2016-03-06  9:04 ` Wim Van Sebroeck

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=56D7A1DF.9030805@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=javier@osg.samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@iguana.be \
    /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