Skip to content

Commit

Permalink
x86, vmi: TSC going backwards check in vmi clocksource, cleanup
Browse files Browse the repository at this point in the history
clean up vmi_read_cycles to use max()

Reported-b: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alok N Kataria <akataria@vmware.com>
Cc: Zach Amsden <zach@vmware.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Alok Kataria authored and Ingo Molnar committed Feb 20, 2009
1 parent 6091628 commit fdb17ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kernel/vmiclock_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ static struct clocksource clocksource_vmi;
static cycle_t read_real_cycles(void)
{
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;
return max(ret, clocksource_vmi.cycle_last);
}

static struct clocksource clocksource_vmi = {
Expand Down

0 comments on commit fdb17ae

Please sign in to comment.