ia64/xen-unstable

changeset 2783:86d715dd8522

bitkeeper revision 1.1159.1.312 (41837e24AgGTJo-4Cu3-XiU5i0cX2w)

Some very small time cleanups. Also call cur_timer->init during resume.
author kaf24@freefall.cl.cam.ac.uk
date Sat Oct 30 11:42:28 2004 +0000 (2004-10-30)
parents c48afdf6aa0f
children 58a1c7dcf446
files linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c
line diff
     1.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c	Sat Oct 30 11:31:53 2004 +0000
     1.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/time.c	Sat Oct 30 11:42:28 2004 +0000
     1.3 @@ -675,21 +675,26 @@ int set_timeout_timer(void)
     1.4  
     1.5  void time_suspend(void)
     1.6  {
     1.7 +	/* nothing */
     1.8  }
     1.9  
    1.10 +/* No locking required. We are only CPU running, and interrupts are off. */
    1.11  void time_resume(void)
    1.12  {
    1.13 -    unsigned long flags;
    1.14 -    write_seqlock_irqsave(&xtime_lock, flags);
    1.15 -    /* Get timebases for new environment. */ 
    1.16 -    __get_time_values_from_xen();
    1.17 -    /* Reset our own concept of passage of system time. */
    1.18 -    processed_system_time = shadow_system_time;
    1.19 -    /* Accept a warp in UTC (wall-clock) time. */
    1.20 -    last_seen_tv.tv_sec = 0;
    1.21 -    /* Make sure we resync UTC time with Xen on next timer interrupt. */
    1.22 -    last_update_from_xen = 0;
    1.23 -    write_sequnlock_irqrestore(&xtime_lock, flags);
    1.24 +	if (cur_timer->init(NULL) != 0)
    1.25 +		BUG();
    1.26 +
    1.27 +	/* Get timebases for new environment. */ 
    1.28 +	__get_time_values_from_xen();
    1.29 +
    1.30 +	/* Reset our own concept of passage of system time. */
    1.31 +	processed_system_time = shadow_system_time;
    1.32 +
    1.33 +	/* Accept a warp in UTC (wall-clock) time. */
    1.34 +	last_seen_tv.tv_sec = 0;
    1.35 +
    1.36 +	/* Make sure we resync UTC time with Xen on next timer interrupt. */
    1.37 +	last_update_from_xen = 0;
    1.38  }
    1.39  
    1.40  /*
     2.1 --- a/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c	Sat Oct 30 11:31:53 2004 +0000
     2.2 +++ b/linux-2.6.9-xen-sparse/arch/xen/i386/kernel/timers/timer_tsc.c	Sat Oct 30 11:42:28 2004 +0000
     2.3 @@ -332,7 +332,6 @@ static inline void cpufreq_delayed_get(v
     2.4  
     2.5  static int __init init_tsc(char* override)
     2.6  {
     2.7 -	unsigned long long alarm;
     2.8  	u64 __cpu_khz;
     2.9  
    2.10  	__cpu_khz = HYPERVISOR_shared_info->cpu_freq;
    2.11 @@ -353,9 +352,7 @@ static int __init init_tsc(char* overrid
    2.12  
    2.13  	set_cyc2ns_scale(cpu_khz/1000);
    2.14  
    2.15 -	rdtscll(alarm);
    2.16 -
    2.17 -	use_tsc=1;
    2.18 +	use_tsc = 1;
    2.19  
    2.20  	return 0;
    2.21  }