diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-21 05:03:07 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-21 05:03:07 +0300 |
commit | be71cb5b526709b8e42c707dc9e8c5b034ac8d1c (patch) | |
tree | fa9496456adce37c4c28b8f84ac6dba796fff6e5 /arch/x86/kernel/vmiclock_32.c | |
parent | b5482d475c6eff1ebc0b1cee73421ef26f1d046c (diff) | |
parent | 07a66d7c53a538e1a9759954a82bb6c07365eff9 (diff) | |
download | linux-be71cb5b526709b8e42c707dc9e8c5b034ac8d1c.tar.xz |
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86: use the right protections for split-up pagetables
x86, vmi: TSC going backwards check in vmi clocksource
Diffstat (limited to 'arch/x86/kernel/vmiclock_32.c')
-rw-r--r-- | arch/x86/kernel/vmiclock_32.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c index c4c1f9e09402..bde106cae0a9 100644 --- a/arch/x86/kernel/vmiclock_32.c +++ b/arch/x86/kernel/vmiclock_32.c @@ -283,10 +283,13 @@ void __devinit vmi_time_ap_init(void) #endif /** vmi clocksource */ +static struct clocksource clocksource_vmi; 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; } static struct clocksource clocksource_vmi = { |