Re: x86, vmi: TSC going backwards check in vmi clocksource

From: Ingo Molnar
Date: Fri Feb 20 2009 - 13:32:17 EST



* Alok Kataria <akataria@xxxxxxxxxx> wrote:

> On Fri, 2009-02-20 at 09:58 -0800, Ingo Molnar wrote:
> > * Alok Kataria <akataria@xxxxxxxxxx> wrote:
> >
> > > static cycle_t read_real_cycles(void)
> > > {
> > > - return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
> > > + cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
> > > + return ret >= clocksource_vmi.cycle_last ?
> > > + ret : clocksource_vmi.cycle_last;
> >
> > btw., could you please clean this up to use max()?
>
> Please find it below, on top of current tip/master.

Applied to tip:x86/cleanups, thanks!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/