ia64/xen-unstable

changeset 18923:df2ee10097c7

x86: Fix early time initialisation after recent changes.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Dec 13 15:02:55 2008 +0000 (2008-12-13)
parents 68b76ad4faf7
children db0c6d297d00
files xen/arch/x86/time.c
line diff
     1.1 --- a/xen/arch/x86/time.c	Thu Dec 11 22:32:20 2008 +0000
     1.2 +++ b/xen/arch/x86/time.c	Sat Dec 13 15:02:55 2008 +0000
     1.3 @@ -1131,6 +1131,9 @@ int __init init_xen_time(void)
     1.4  
     1.5      open_softirq(TIME_CALIBRATE_SOFTIRQ, local_time_calibration);
     1.6  
     1.7 +    /* System time (get_s_time()) starts ticking from now. */
     1.8 +    rdtscll(this_cpu(cpu_time).local_tsc_stamp);
     1.9 +
    1.10      /* NB. get_cmos_time() can take over one second to execute. */
    1.11      do_settime(get_cmos_time(), 0, NOW());
    1.12  
    1.13 @@ -1146,12 +1149,9 @@ int __init init_xen_time(void)
    1.14  /* Early init function. */
    1.15  void __init early_time_init(void)
    1.16  {
    1.17 -    struct cpu_time *t = &this_cpu(cpu_time);
    1.18      u64 tmp = init_pit_and_calibrate_tsc();
    1.19  
    1.20 -    /* So we can use get_s_time() during early boot. */
    1.21 -    set_time_scale(&t->tsc_scale, tmp);
    1.22 -    rdtscll(t->local_tsc_stamp);
    1.23 +    set_time_scale(&this_cpu(cpu_time).tsc_scale, tmp);
    1.24  
    1.25      do_div(tmp, 1000);
    1.26      cpu_khz = (unsigned long)tmp;