From: Thomas Gleixner <tglx@linutronix.de>
To: John Stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] Add clocksource_register_hz/khz interface
Date: Sat, 1 May 2010 10:45:22 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1005011042290.25342@localhost.localdomain> (raw)
In-Reply-To: <1272677785-23881-1-git-send-email-johnstul@us.ibm.com>
On Fri, 30 Apr 2010, John Stultz wrote:
> +/**
> + * clocksource_register - Used to install new clocksources
> + * @t: clocksource to be registered
Can you fix the kernel doc please ?
> + *
> + * Returns -EBUSY if registration fails, zero otherwise.
> + */
> +int clocksource_register_hz(struct clocksource *cs, u32 hz)
> +{
> +
> + /* Ideally we want to use some of the limits used in
> + * clocksource_max_deferment, to provide a more informed
> + * MAX_UPDATE_LENGTH. But for now this just gets the
> + * regiseter interface working properly.
> + */
> + clocks_calc_mult_shift(&cs->mult, &cs->shift, hz,
> + NSEC_PER_SEC, MAX_UPDATE_LENGTH);
> + cs->max_idle_ns = clocksource_max_deferment(cs);
> +
> + mutex_lock(&clocksource_mutex);
> + clocksource_enqueue(cs);
> + clocksource_select();
> + clocksource_enqueue_watchdog(cs);
> + mutex_unlock(&clocksource_mutex);
> + return 0;
> +}
> +EXPORT_SYMBOL(clocksource_register_hz);
EXPORT_SYMBOL_GPL please
> +
> +/**
> + * clocksource_register - Used to install new clocksources
> + * @t: clocksource to be registered
> + *
> + * Returns -EBUSY if registration fails, zero otherwise.
> + */
> +int clocksource_register_khz(struct clocksource *cs, u32 khz)
> +{
shouldn't that be a simple inline wrapper which does
return clocksource_register_hz(cs, khz * 1000);
Thanks,
tglx
prev parent reply other threads:[~2010-05-01 8:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-01 1:36 John Stultz
2010-05-01 1:36 ` [PATCH 2/3] Convert common x86 clocksources to use clocksource_register_hz/khz John Stultz
2010-05-01 1:36 ` [RFC][PATCH 3/3] Try to convert non-trivial clocksources to clocksource_register_hz John Stultz
2010-05-10 15:53 ` Martin Schwidefsky
2010-05-10 19:19 ` john stultz
2010-05-11 6:20 ` Martin Schwidefsky
2010-05-10 21:33 ` Jim Cromie
2010-05-11 0:04 ` john stultz
2010-05-11 1:51 ` Jim Cromie
2010-05-11 0:37 ` john stultz
2010-05-12 16:43 ` Julien Ridoux
2010-05-01 8:45 ` Thomas Gleixner [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=alpine.LFD.2.00.1005011042290.25342@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
Powered by JetHome