diff options
author | Alok Kataria <akataria@vmware.com> | 2009-02-20 10:23:18 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-20 19:31:03 +0100 |
commit | fdb17aeb28aaad3eae5ef57e70cb287d34d1049d (patch) | |
tree | e89021b7396266476eb89e8ae97526d4f8579e31 /arch/x86/kernel/vmiclock_32.c | |
parent | 609162850db11dfe3b23f43b36888aa8b3ad7685 (diff) |
x86, vmi: TSC going backwards check in vmi clocksource, cleanup
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>
Diffstat (limited to 'arch/x86/kernel/vmiclock_32.c')
-rw-r--r-- | arch/x86/kernel/vmiclock_32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c index 9cd28c04952..b77ad5789af 100644 --- a/arch/x86/kernel/vmiclock_32.c +++ b/arch/x86/kernel/vmiclock_32.c @@ -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 = { |