lkml.org 
[lkml]   [2013]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] clocksource: fix misleading comment for __clocksource_updatefreq_scale()
On 09/17/2013 07:57 PM, Xie XiuQi wrote:
> Functions clocksource_updatefreq_hz() and clocksource_updatefreq_khz()
> mentioned in the comment of __clocksource_updatefreq_scale() do not exist.
>
> As Thomas Gleixner's suggestion, I renamed the functions and the few call
> sites because the underscores are completely meaningless.

First of all, sorry for taking so long to reply here.

So I think the __ tries to imply that those are semi-internal functions
that aren't to be causally used w/o understanding the internal details.

> Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---
> drivers/clocksource/cadence_ttc_timer.c | 2 +-
> drivers/clocksource/em_sti.c | 2 +-
> drivers/clocksource/sh_cmt.c | 2 +-
> drivers/clocksource/sh_tmu.c | 2 +-
> include/linux/clocksource.h | 4 ++--
> 5 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/clocksource/cadence_ttc_timer.c b/drivers/clocksource/cadence_ttc_timer.c
> index 4cbe28c..05f00e7 100644
> --- a/drivers/clocksource/cadence_ttc_timer.c
> +++ b/drivers/clocksource/cadence_ttc_timer.c
> @@ -226,7 +226,7 @@ static int ttc_rate_change_clocksource_cb(struct notifier_block *nb,
> * Do whatever is necessary to maintain a proper time base
> *
> * I cannot find a way to adjust the currently used clocksource
> - * to the new frequency. __clocksource_updatefreq_hz() sounds
> + * to the new frequency. clocksource_updatefreq_hz() sounds
> * good, but does not work. Not sure what's that missing.
> *

So I know you didn't write the comment, but my issue with this comment
is that there isn't a way to adjust the currently used clocksource
frequency, because that is totally unsupported. The
__clocksource_updatefreq_hz() method is really only there for
clocksources that are currently not in-use and are disabled.
Specifically for clocksources that may come out of resume at a different
frequency, like the sh_ ones. Hacks like what the cadence_ttc driver is
trying to do result in very poor timekeeping.

So I'm sort of on the fence about this patch.

Thomas: Any other thoughts?

thanks
-john


\
 
 \ /
  Last update: 2013-10-10 01:41    [W:0.118 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site