public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vitaly Kuzmichev <vkuzmichev@mvista.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-watchdog@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	Wim Van Sebroeck <wim@iguana.be>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Colin Cross <ccross@android.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3 1/4] ARM: smp_twd: Fix typo in 'twd_timer_rate' printing
Date: Mon, 11 Jul 2011 15:50:10 +0400	[thread overview]
Message-ID: <4E1AE372.1000909@mvista.com> (raw)
In-Reply-To: <20110710104740.GD4812@n2100.arm.linux.org.uk>

Hi Russell,

On 07/10/2011 02:47 PM, Russell King - ARM Linux wrote:
> On Thu, Jul 07, 2011 at 08:20:49PM +0400, Vitaly Kuzmichev wrote:
>> Hi Russell,
>>
>> On 07/07/2011 04:39 PM, Russell King - ARM Linux wrote:
>>> On Thu, Jul 07, 2011 at 04:23:13PM +0400, Vitaly Kuzmichev wrote:
>>>> To get hundredths of MHz the rate needs to be divided by 10'000.
>>>> Here is an example:
>>>>  twd_timer_rate = 123456789
>>>>  Before the patch:
>>>>     twd_timer_rate / 1000000 = 123
>>>>     (twd_timer_rate / 1000000) % 100 = 23
>>>>     Result: 123.23MHz.
>>>>  After being fixed:
>>>>     twd_timer_rate / 1000000 = 123
>>>>     (twd_timer_rate / 10000) % 100 = 45
>>>>     Result: 123.45MHz.
>>>>
>>>> Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
>>>
>>> -> patch system please.
>>
>> Should I submit other patches into this system too?
> 
> No, the other patches I've yet to look at, and I think there's issues
> still to be resolved.
> 
> Eg, ISTR a patch to make smp_twd.c selectable on non-SMP platforms so
> that the mpcore watchdog can be used on non-SMP platforms.  While that
> fixes the build issues, functionally its broken.  I don't think that
> the mpcore watchdog should be asking the smp_twd code in any case for
> the clock rate.

I'm guessing that you mean here both cases when non-SMP kernel runs on
multi-core and on single-core (I'm not sure whether they really exist)
MPCore CPUs, do you? I think in both these cases TWD timer(s) should
always be presented in MPCore. So it is wrong to call this timer as
SMP_TWD and make it dependent on CONFIG_SMP, isn't it?

I just mean, probably the fact that mpcore_wdt depends on swp_twd is not
a real issue, and my patch is correct, but does not fix everything. In
this case it's better than nothing, better than watchdog that does not
work properly either on SMP, or on non-SMP platforms.
Note that my patch does not introduce new dependencies, it just relies
on the one that already exists.

As regarding to new clocksource/arm_smp_twd driver, if it can be
compiled for non-SMP kernel/platform the mpcore_wdt will also be able to
do the same (even with only my patch). But in the case of clk interface
mpcore_wdt will be dependent on TWD's clk structure anyway. So I can
think only of one case when it can be fully independent from TWD: having
own calibration loop.

> If we get the issue with knowing the TWD clock rate on ARMs development
> platforms sorted out, then we can provide a struct clk for it, which
> means everyone can finally move to using the clk API to get the mpcore
> watchdog/twd clock rate.

I really like this. And I will be happy if this happens before than I'm
expecting :)
Ok, lets assume that this happened. Can you guarantee that the one who
will fix the mpcore_wdt to use clk interface also will not reuse the
formula that was there before? :)


Thanks,
Vitaly.

  reply	other threads:[~2011-07-11 11:50 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04  9:45 [PATCH 0/4] ARM: smp_twd: mpcore_wdt: Fix MPCORE watchdog setup vkuzmichev
2010-10-04  9:45 ` [PATCH 1/4] ARM: smp_twd: mpcore_wdt: Fix watchdog counter loading vkuzmichev
2010-10-04  9:45 ` [PATCH 2/4] ARM: smp_twd: Fix typo in twd_timer_rate printout vkuzmichev
2010-10-04  9:45 ` [PATCH 3/4] ARM: mpcore_wdt: Fix WDIOC_SETOPTIONS handling vkuzmichev
2010-10-04  9:45 ` [PATCH 4/4] ARM: mpcore_wdt: Fix timer mode setup vkuzmichev
2011-05-27  8:26 ` [PATCH 0/4] ARM: smp_twd: mpcore_wdt: Fix MPCORE watchdog setup Wim Van Sebroeck
2011-05-27 10:44   ` Marc Zyngier
2011-07-05 19:00 ` [PATCH V2 0/6] arm_smp_twd: " Vitaly Kuzmichev
2011-07-06 10:05   ` Marc Zyngier
2011-07-06 10:14     ` Russell King - ARM Linux
2011-07-06 11:05       ` Catalin Marinas
2011-07-06 11:16         ` Russell King - ARM Linux
2011-07-10 10:39           ` Russell King - ARM Linux
2011-07-11  9:43           ` Catalin Marinas
2011-07-11  9:54             ` Russell King - ARM Linux
2011-07-11 11:06               ` Catalin Marinas
2011-07-06 12:27     ` Vitaly Kuzmichev
2011-07-06 12:39       ` Marc Zyngier
2011-07-06 15:06         ` Vitaly Kuzmichev
2011-07-05 19:00 ` [PATCH V2 1/6] arm_smp_twd: Fix typo in 'twd_timer_rate' printing Vitaly Kuzmichev
2011-07-05 19:00 ` [PATCH V2 2/6] arm_smp_twd: mpcore_wdt: Fix watchdog counter loading Vitaly Kuzmichev
2011-07-06 12:05   ` Arnd Bergmann
2011-07-05 19:00 ` [PATCH V2 3/6] mpcore_wdt: Fix WDIOC_SETOPTIONS handling Vitaly Kuzmichev
2011-07-06 12:05   ` Sergei Shtylyov
2011-07-06 12:22   ` Arnd Bergmann
2011-07-06 13:13     ` Vitaly Kuzmichev
2011-07-06 13:48   ` Russell King - ARM Linux
2011-07-06 13:52     ` Russell King - ARM Linux
2011-07-06 14:19       ` Arnd Bergmann
2011-07-06 15:27         ` Arnd Bergmann
2011-07-06 17:28           ` Wim Van Sebroeck
2011-07-05 19:00 ` [PATCH V2 4/6] mpcore_wdt: Fix timer mode setup Vitaly Kuzmichev
2011-07-05 19:00 ` [PATCH V2 5/6] mpcore_wdt: Add cpufreq notifier to reload counter Vitaly Kuzmichev
2011-07-06 12:09   ` Sergei Shtylyov
2011-07-05 19:00 ` [PATCH V2 6/6] mpcore_wdt: Move declarations in a separate header Vitaly Kuzmichev
2011-07-06 11:58   ` Arnd Bergmann
2011-07-06 12:36     ` Vitaly Kuzmichev
2011-07-06 12:48       ` Arnd Bergmann
2011-07-10 10:42         ` Russell King - ARM Linux
2011-07-06 12:11   ` Sergei Shtylyov
2011-07-07 12:22 ` [PATCH V3 0/4] ARM: smp_twd: mpcore_wdt: Fix MPCORE watchdog setup Vitaly Kuzmichev
2011-07-07 12:23   ` [PATCH V3 1/4] ARM: smp_twd: Fix typo in 'twd_timer_rate' printing Vitaly Kuzmichev
2011-07-07 12:39     ` Russell King - ARM Linux
2011-07-07 12:50       ` Vitaly Kuzmichev
2011-07-07 13:31         ` Vitaly Kuzmichev
2011-07-07 16:20       ` Vitaly Kuzmichev
2011-07-10 10:47         ` Russell King - ARM Linux
2011-07-11 11:50           ` Vitaly Kuzmichev [this message]
2011-07-07 12:23   ` [PATCH V3 2/4] ARM: smp_twd: mpcore_wdt: Fix watchdog counter loading Vitaly Kuzmichev
2011-07-07 12:44     ` Arnd Bergmann
2011-07-07 14:09       ` Vitaly Kuzmichev
2011-07-07 12:23   ` [PATCH V3 3/4] ARM: mpcore_wdt: Fix WDIOC_SETOPTIONS handling Vitaly Kuzmichev
2011-07-07 12:45     ` Arnd Bergmann
2011-07-07 12:23   ` [PATCH V3 4/4] ARM: mpcore_wdt: Fix timer mode setup Vitaly Kuzmichev
2011-07-07 12:46   ` [PATCH V3 0/4] ARM: smp_twd: mpcore_wdt: Fix MPCORE watchdog setup Wim Van Sebroeck
2011-07-07 14:06   ` [PATCH V4 2/4] ARM: smp_twd: mpcore_wdt: Fix watchdog counter loading Vitaly Kuzmichev

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=4E1AE372.1000909@mvista.com \
    --to=vkuzmichev@mvista.com \
    --cc=arnd@arndb.de \
    --cc=ccross@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=marc.zyngier@arm.com \
    --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