public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add clocksource_register_hz/khz interface
Date: Fri, 07 May 2010 11:49:38 -0700	[thread overview]
Message-ID: <1273258178.2776.2.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LFD.2.00.1005071735260.3401@localhost.localdomain>

On Fri, 2010-05-07 at 17:44 +0200, Thomas Gleixner wrote:
> On Wed, 5 May 2010, John Stultz wrote:
> 
> > Hey Thomas,
> > 	I updated the patch docs and made the calls EXPORT_SYMBOL_GPL.
> > However the need for both khz and hz is due to high freq clocksources
> > like the TSC who's cycles/sec are close to the upper bound of a u32.
> 
> Come on. It's not that hard :)

Oh... So your fine with having two interfaces, but just want the code
redundancy removed between the two interfaces? 

Ok, I misunderstood. That's no problem.

thanks
-john


> int clocksource_register_freq(struct clocksource *cs, u32 scale, u32 freq)
> {
> 	clocks_calc_mult_shift(&cs->mult, &cs->shift, freq,
> 			       NSEC_PER_SEC / scale, MAX_UPDATE_LENGTH * scale);
> 
> 	....
> }
> 
> static inline int clocksource_register_hz(struct clocksource *cs, u32 freq)
> {
> 	clocksource_regiser_freq(cs, 1, freq);
> }
> 
> static inline int clocksource_register_khz(struct clocksource *cs, u32 freq)
> {
> 	clocksource_regiser_freq(cs, 1000, freq);
> }
> 
> Thanks,
> 
> 	tglx



      reply	other threads:[~2010-05-07 18:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-06  2:27 [PATCH] Add clocksource_register_hz/khz interface John Stultz
2010-05-07 15:44 ` Thomas Gleixner
2010-05-07 18:49   ` john stultz [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=1273258178.2776.2.camel@localhost.localdomain \
    --to=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.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