ia64/xen-unstable

changeset 2922:ac42e731eebc

bitkeeper revision 1.1159.1.396 (4190b0993dyih2jcsaNFCf8mqgG-bw)

Pass domain to update_dom_time instead of shared_info.
author cl349@freefall.cl.cam.ac.uk
date Tue Nov 09 11:57:13 2004 +0000 (2004-11-09)
parents e809b69fa26a
children 5eaad90b54c0
files xen/arch/x86/domain.c xen/arch/x86/time.c xen/common/domain.c xen/common/schedule.c xen/include/xen/time.h
line diff
     1.1 --- a/xen/arch/x86/domain.c	Tue Nov 09 11:35:28 2004 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Tue Nov 09 11:57:13 2004 +0000
     1.3 @@ -828,7 +828,7 @@ int construct_dom0(struct domain *p,
     1.4      }
     1.5  
     1.6      /* Set up shared-info area. */
     1.7 -    update_dom_time(p->shared_info);
     1.8 +    update_dom_time(p);
     1.9      p->shared_info->domain_time = 0;
    1.10      /* Mask all upcalls... */
    1.11      for ( i = 0; i < MAX_VIRT_CPUS; i++ )
     2.1 --- a/xen/arch/x86/time.c	Tue Nov 09 11:35:28 2004 +0000
     2.2 +++ b/xen/arch/x86/time.c	Tue Nov 09 11:57:13 2004 +0000
     2.3 @@ -274,8 +274,9 @@ s_time_t get_s_time(void)
     2.4  }
     2.5  
     2.6  
     2.7 -void update_dom_time(shared_info_t *si)
     2.8 +void update_dom_time(struct domain *d)
     2.9  {
    2.10 +    shared_info_t *si = d->shared_info;
    2.11      unsigned long flags;
    2.12  
    2.13      read_lock_irqsave(&time_lock, flags);
    2.14 @@ -318,7 +319,7 @@ void do_settime(unsigned long secs, unsi
    2.15  
    2.16      write_unlock_irq(&time_lock);
    2.17  
    2.18 -    update_dom_time(current->domain->shared_info);
    2.19 +    update_dom_time(current->domain);
    2.20  }
    2.21  
    2.22  
     3.1 --- a/xen/common/domain.c	Tue Nov 09 11:35:28 2004 +0000
     3.2 +++ b/xen/common/domain.c	Tue Nov 09 11:57:13 2004 +0000
     3.3 @@ -278,7 +278,7 @@ int final_setup_guestos(struct domain *p
     3.4          goto out;
     3.5  
     3.6      /* Set up the shared info structure. */
     3.7 -    update_dom_time(p->shared_info);
     3.8 +    update_dom_time(p);
     3.9  
    3.10      set_bit(DF_CONSTRUCTED, &p->d_flags);
    3.11  
     4.1 --- a/xen/common/schedule.c	Tue Nov 09 11:35:28 2004 +0000
     4.2 +++ b/xen/common/schedule.c	Tue Nov 09 11:57:13 2004 +0000
     4.3 @@ -390,7 +390,7 @@ void __enter_scheduler(void)
     4.4  
     4.5      /* Ensure that the domain has an up-to-date time base. */
     4.6      if ( !is_idle_task(next->domain) )
     4.7 -        update_dom_time(next->domain->shared_info);
     4.8 +        update_dom_time(next->domain);
     4.9  
    4.10      if ( unlikely(prev == next) )
    4.11          return;
    4.12 @@ -468,7 +468,7 @@ static void t_timer_fn(unsigned long unu
    4.13      TRACE_0D(TRC_SCHED_T_TIMER_FN);
    4.14  
    4.15      if ( !is_idle_task(p->domain) ) {
    4.16 -        update_dom_time(p->domain->shared_info);
    4.17 +        update_dom_time(p->domain);
    4.18          send_guest_virq(p, VIRQ_TIMER);
    4.19      }
    4.20  
    4.21 @@ -482,7 +482,7 @@ static void dom_timer_fn(unsigned long d
    4.22      struct domain *p = (struct domain *)data;
    4.23      struct exec_domain *ed = p->exec_domain[0];
    4.24      TRACE_0D(TRC_SCHED_DOM_TIMER_FN);
    4.25 -    update_dom_time(p->shared_info);
    4.26 +    update_dom_time(p);
    4.27      send_guest_virq(ed, VIRQ_TIMER);
    4.28  }
    4.29  
    4.30 @@ -496,7 +496,7 @@ static void fallback_timer_fn(unsigned l
    4.31      TRACE_0D(TRC_SCHED_FALLBACK_TIMER_FN);
    4.32  
    4.33      if ( !is_idle_task(p) )
    4.34 -        update_dom_time(p->shared_info);
    4.35 +        update_dom_time(p);
    4.36  
    4.37      fallback_timer[ed->processor].expires = NOW() + MILLISECS(500);
    4.38      add_ac_timer(&fallback_timer[ed->processor]);
     5.1 --- a/xen/include/xen/time.h	Tue Nov 09 11:35:28 2004 +0000
     5.2 +++ b/xen/include/xen/time.h	Tue Nov 09 11:57:13 2004 +0000
     5.3 @@ -34,6 +34,8 @@ extern int init_xen_time();
     5.4  
     5.5  extern unsigned long cpu_khz;
     5.6  
     5.7 +struct domain;
     5.8 +
     5.9  /*
    5.10   * System Time
    5.11   * 64 bit value containing the nanoseconds elapsed since boot time.
    5.12 @@ -52,7 +54,7 @@ s_time_t get_s_time(void);
    5.13  #define MILLISECS(_ms)  (((s_time_t)(_ms)) * 1000000ULL )
    5.14  #define MICROSECS(_us)  (((s_time_t)(_us)) * 1000ULL )
    5.15  
    5.16 -extern void update_dom_time(shared_info_t *si);
    5.17 +extern void update_dom_time(struct domain *d);
    5.18  extern void do_settime(unsigned long secs, unsigned long usecs, 
    5.19                         u64 system_time_base);
    5.20