All of lore.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2] sh_tmu: compute mult and shift before registration
Date: Fri, 11 Jun 2010 03:03:39 +0000	[thread overview]
Message-ID: <1276225419.16089.90.camel@work-vm> (raw)
In-Reply-To: <1275342348-22499-1-git-send-email-aurelien@aurel32.net>

On Thu, 2010-06-10 at 12:27 -0700, john stultz wrote:
> On Thu, 2010-06-10 at 15:20 +0900, Magnus Damm wrote:
> > On Tue, Jun 8, 2010 at 4:28 AM, john stultz <johnstul@us.ibm.com> wrote:
> > > Does that sound reasonable?
> > 
> > I think so. So like I mentioned earlier, we don't know what frequency
> > range is suitable at clock source registration time. So from that
> > point of view I can't really see why we should keep the
> > clocksource_register_hz()/khz() functions. Updating the frequency in
> > the ->enable() callback and using clocksource_register() sounds simple
> > and straightforward to me. Ideally I'd like to avoid setting up the
> > mult and shift values before registration and instead put all logic in
> > the ->enable() callback.
> > 
> > The ->enable() callback is optional so we will have to deal with
> > clocksources without ->enable() callbacks. This should be trivial -
> > such drivers can manually setup shift/mult or call
> > __clocksource_update_freq() before clocksource_register().
> 
> Why not instead register the tmu clocksource with a dummy freq initially
> and then update it in ->enable()?
> 
> I'd just prefer to not complicate the majority of clocksources just to
> handle the few (2) cases where we don't know the frequency at
> registration time.

So I took a rough shot at this. Would you mind checking it out and
seeing if its sufficient?

Its my first two patches from the conversion patchset here:
http://sr71.net/~jstultz/timekeeping/clocksourceregister_hz/patches/

Specifically: 
http://sr71.net/~jstultz/timekeeping/clocksourceregister_hz/patches/0001-Add-__clocksource_updatefreq_hz-khz-methods.patch
http://sr71.net/~jstultz/timekeeping/clocksourceregister_hz/patches/0002-Convert-sh_tmu-sh_cmt-clocksources-to-clocksource_re.patch


Let me know if there's anything I'm missing.

thanks
-john


  parent reply	other threads:[~2010-06-11  3:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31 21:45 [PATCH v2] sh_tmu: compute mult and shift before registration Aurelien Jarno
2010-06-02  8:23 ` Paul Mundt
2010-06-02  9:10 ` Aurelien Jarno
2010-06-07  7:06 ` Magnus Damm
2010-06-07 19:28 ` john stultz
2010-06-10  6:20 ` Magnus Damm
2010-06-10 19:27 ` john stultz
2010-06-11  3:03 ` john stultz [this message]
2010-06-11  4:38 ` Magnus Damm
2010-06-11  5:02 ` Magnus Damm
2010-06-11  6:01 ` Paul Mundt
2010-06-11  6:33 ` Aurelien Jarno

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=1276225419.16089.90.camel@work-vm \
    --to=johnstul@us.ibm.com \
    --cc=linux-sh@vger.kernel.org \
    /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.