ia64/xen-unstable

diff xen/arch/ia64/xen/xentime.c @ 9405:29dfadcc5029

[IA64] Followup to xen time cleanup

Clean up to xen time handler. Tristan #if 0 some code because it seems
redundant, which however is actually problematic logic as a reason for
an intermittent timer oops issue of dom0. So delete it now.

Also remove vcpu_wake, since wakeup current has nothing meaningful and
simply waste cpu cycle.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
author awilliam@xenbuild.aw
date Mon Mar 27 15:32:08 2006 -0700 (2006-03-27)
parents 58a3ed82eee4
children 2b6e531dab38
line diff
     1.1 --- a/xen/arch/ia64/xen/xentime.c	Fri Mar 24 11:36:22 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/xentime.c	Mon Mar 27 15:32:08 2006 -0700
     1.3 @@ -118,42 +118,18 @@ xen_timer_interrupt (int irq, void *dev_
     1.4  #endif
     1.5  #endif
     1.6  
     1.7 -#if 0
     1.8 -	/* Nobody seems to be able to explain this code.
     1.9 -	   It seems to be accumulated tricks, which are not required anymore.
    1.10 -	   Also I have made many tests, I'd like to get confirmation from
    1.11 -	   other site (TG).  */
    1.12 -	if (current->domain == dom0) {
    1.13 -		// FIXME: there's gotta be a better way of doing this...
    1.14 -		// We have to ensure that domain0 is launched before we
    1.15 -		// call vcpu_timer_expired on it
    1.16 -		//domain0_ready = 1; // moved to xensetup.c
    1.17 -		VCPU(current,pending_interruption) = 1;
    1.18 -	}
    1.19 -	if (domain0_ready && current->domain != dom0) {
    1.20 -		if(vcpu_timer_expired(dom0->vcpu[0])) {
    1.21 -			vcpu_pend_timer(dom0->vcpu[0]);
    1.22 -			//vcpu_set_next_timer(dom0->vcpu[0]);
    1.23 -			vcpu_wake(dom0->vcpu[0]);
    1.24 -		}
    1.25 -	}
    1.26 -#endif
    1.27 -	if (!is_idle_domain(current->domain))  {
    1.28 +	if (!is_idle_domain(current->domain))
    1.29  		if (vcpu_timer_expired(current)) {
    1.30  			vcpu_pend_timer(current);
    1.31  			// ensure another timer interrupt happens even if domain doesn't
    1.32  			vcpu_set_next_timer(current);
    1.33 -			vcpu_wake(current);
    1.34  		}
    1.35 -	}
    1.36 +
    1.37  	new_itm = local_cpu_data->itm_next;
    1.38  
    1.39  	if (!VMX_DOMAIN(current) && !time_after(ia64_get_itc(), new_itm))
    1.40  		return IRQ_HANDLED;
    1.41  
    1.42 -	if (VMX_DOMAIN(current))
    1.43 -		vcpu_wake(current);
    1.44 -
    1.45  	while (1) {
    1.46  		new_itm += local_cpu_data->itm_delta;
    1.47  
    1.48 @@ -199,12 +175,7 @@ xen_timer_interrupt (int irq, void *dev_
    1.49  		 */
    1.50  		while (!time_after(new_itm, ia64_get_itc() + local_cpu_data->itm_delta/2))
    1.51  			new_itm += local_cpu_data->itm_delta;
    1.52 -//#ifdef XEN
    1.53 -//		vcpu_set_next_timer(current);
    1.54 -//#else
    1.55 -//printf("***** timer_interrupt: Setting itm to %lx\n",new_itm);
    1.56  		ia64_set_itm(new_itm);
    1.57 -//#endif
    1.58  		/* double check, in case we got hit by a (slow) PMI: */
    1.59  	} while (time_after_eq(ia64_get_itc(), new_itm));
    1.60  	raise_softirq(TIMER_SOFTIRQ);