From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add clocksource_register_hz/khz interface
Date: Fri, 7 May 2010 17:44:57 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1005071735260.3401@localhost.localdomain> (raw)
In-Reply-To: <1273112824-5112-1-git-send-email-johnstul@us.ibm.com>
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 :)
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
next prev parent reply other threads:[~2010-05-07 15:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 2:27 John Stultz
2010-05-07 15:44 ` Thomas Gleixner [this message]
2010-05-07 18:49 ` john stultz
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=alpine.LFD.2.00.1005071735260.3401@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®