ia64/xen-unstable

changeset 16026:b3814860d170

x86: Fix time going backwards on CPU frequency change.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Mon Oct 01 09:32:25 2007 +0100 (2007-10-01)
parents 96895c637d27
children 69a74ac976cb
files xen/arch/x86/time.c
line diff
     1.1 --- a/xen/arch/x86/time.c	Mon Oct 01 09:32:04 2007 +0100
     1.2 +++ b/xen/arch/x86/time.c	Mon Oct 01 09:32:25 2007 +0100
     1.3 @@ -728,11 +728,11 @@ int cpu_frequency_change(u64 freq)
     1.4      u64 curr_tsc;
     1.5  
     1.6      local_irq_disable();
     1.7 -    set_time_scale(&t->tsc_scale, freq);
     1.8      rdtscll(curr_tsc);
     1.9      t->local_tsc_stamp = curr_tsc;
    1.10      t->stime_local_stamp = get_s_time();
    1.11      t->stime_master_stamp = read_platform_stime();
    1.12 +    set_time_scale(&t->tsc_scale, freq);
    1.13      local_irq_enable();
    1.14  
    1.15      /* A full epoch should pass before we check for deviation. */