[tip:x86/cleanups] x86, vmi: TSC going backwards check in vmi clocksource, cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Author:     Alok Kataria <akataria@xxxxxxxxxx>
AuthorDate: Fri, 20 Feb 2009 10:23:18 -0800
Commit:     Ingo Molnar <mingo@xxxxxxx>
CommitDate: Fri, 20 Feb 2009 19:31:03 +0100

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

clean up vmi_read_cycles to use max()

Reported-b: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Alok N Kataria <akataria@xxxxxxxxxx>
Cc: Zach Amsden <zach@xxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
 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 9cd28c0..b77ad57 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 = {
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux