[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1250201674.7149.3.camel@localhost.localdomain>
Date: Thu, 13 Aug 2009 15:14:34 -0700
From: john stultz <johnstul@...ibm.com>
To: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Daniel Walker <dwalker@...o99.com>
Subject: Re: [patch 02/14] remove clocksource inline functions
On Thu, 2009-08-13 at 17:40 +0200, Martin Schwidefsky wrote:
> plain text document attachment (clocksource-inline.diff)
> From: Martin Schwidefsky <schwidefsky@...ibm.com>
>
> The three inline functions clocksource_read, clocksource_enable
> and clocksource_disable are simple wrappers of an indirect call
> plus the copy from and to the mult_orig value. The functions
> are exclusively used by the timekeeping code which has intimate
> knowledge of the clocksource anyway. Therefore remove the inline
> functions. No functional change.
>
> Cc: Ingo Molnar <mingo@...e.hu>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Daniel Walker <dwalker@...o99.com>
> Acked-by: John Stultz <johnstul@...ibm.com>
> Signed-off-by: Martin Schwidefsky <schwidefsky@...ibm.com>
> ---
> include/linux/clocksource.h | 58
> --------------------------------------------
> kernel/time/timekeeping.c | 42 +++++++++++++++++++++----------
> 2 files changed, 28 insertions(+), 72 deletions(-)
>
> Index: linux-2.6/kernel/time/timekeeping.c
> ===================================================================
> --- linux-2.6.orig/kernel/time/timekeeping.c
> +++ linux-2.6/kernel/time/timekeeping.c
[snip]
> @@ -477,8 +492,7 @@ static int timekeeping_resume(struct sys
> }
> update_xtime_cache(0);
> /* re-base the last cycle value */
> - clock->cycle_last = 0;
> - clock->cycle_last = clocksource_read(clock);
> + clock->cycle_last = clock->read(clock);
Minor bug here, the clearing of cycle_last has a side-effect of making
sure the TSC doesn't trip over its own cycle_last checking in the read()
function. This is part of the uglyness of the TSC pulling this internal
timeekping state to avoid minor inconsistencies, but until we find a
better way, we have to live with it.
So you'll need to preserve the cycle_last = 0 line.
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