[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5255E847.9030502@linaro.org>
Date: Wed, 09 Oct 2013 16:35:35 -0700
From: John Stultz <john.stultz@...aro.org>
To: Xie XiuQi <xiexiuqi@...wei.com>,
Thomas Gleixner <tglx@...utronix.de>
CC: Ingo Molnar <mingo@...e.hu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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@...wei.com>
> Cc: Thomas Gleixner <tglx@...utronix.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists