xen-vtx-unstable
changeset 6081:662c9d34b3c7
Small time fixes.
Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Wed Aug 10 16:03:31 2005 +0000 (2005-08-10) |
parents | 49671266459c |
children | 14aa0818c1ca |
files | linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Wed Aug 10 15:14:50 2005 +0000 1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c Wed Aug 10 16:03:31 2005 +0000 1.3 @@ -209,8 +209,6 @@ void init_cpu_khz(void) 1.4 cpu_khz = __cpu_khz >> -info->tsc_shift; 1.5 else 1.6 cpu_khz = __cpu_khz << info->tsc_shift; 1.7 - printk(KERN_INFO "Xen reported: %lu.%03lu MHz processor.\n", 1.8 - cpu_khz / 1000, cpu_khz % 1000); 1.9 } 1.10 1.11 static u64 get_nsec_offset(struct shadow_time_info *shadow) 1.12 @@ -794,13 +792,15 @@ void __init time_init(void) 1.13 } 1.14 #endif 1.15 get_time_values_from_xen(); 1.16 - update_wallclock(); 1.17 - set_normalized_timespec(&wall_to_monotonic, 1.18 - -xtime.tv_sec, -xtime.tv_nsec); 1.19 + 1.20 processed_system_time = per_cpu(shadow_time, 0).system_timestamp; 1.21 per_cpu(processed_system_time, 0) = processed_system_time; 1.22 1.23 + update_wallclock(); 1.24 + 1.25 init_cpu_khz(); 1.26 + printk(KERN_INFO "Xen reported: %lu.%03lu MHz processor.\n", 1.27 + cpu_khz / 1000, cpu_khz % 1000); 1.28 1.29 #if defined(__x86_64__) 1.30 vxtime.mode = VXTIME_TSC; 1.31 @@ -875,15 +875,13 @@ void time_resume(void) 1.32 { 1.33 init_cpu_khz(); 1.34 1.35 - /* Get timebases for new environment. */ 1.36 get_time_values_from_xen(); 1.37 - update_wallclock(); 1.38 1.39 - /* Reset our own concept of passage of system time. */ 1.40 - processed_system_time = 1.41 - per_cpu(shadow_time, smp_processor_id()).system_timestamp; 1.42 + processed_system_time = per_cpu(shadow_time, 0).system_timestamp; 1.43 per_cpu(processed_system_time, 0) = processed_system_time; 1.44 1.45 + update_wallclock(); 1.46 + 1.47 per_cpu(timer_irq, 0) = bind_virq_to_irq(VIRQ_TIMER); 1.48 (void)setup_irq(per_cpu(timer_irq, 0), &irq_timer); 1.49 }