lkml.org 
[lkml]   [2009]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86, vmi: TSC going backwards check in vmi clocksource

* Alok Kataria <akataria@vmware.com> 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()?

Ingo


\
 
 \ /
  Last update: 2009-02-20 19:01    [from the cache]
©2003-2011 Jasper Spaans