direct-io.hg

changeset 5528:05d595a0f3cf

bitkeeper revision 1.1713.2.15 (42b83cd9ZuKJm7KtLvrltP6UcgDu_A)

Handle dup tick in hyper_get_ivr
Signed-off-by: Dan Magenheimer <dan.magenheimer@hp.com>
author djm@kirby.fc.hp.com
date Tue Jun 21 16:14:17 2005 +0000 (2005-06-21)
parents a787d0c6f797
children 3cc88ea3498a
files xen/arch/ia64/asm-offsets.c xen/arch/ia64/hyperprivop.S
line diff
     1.1 --- a/xen/arch/ia64/asm-offsets.c	Tue Jun 21 15:56:07 2005 +0000
     1.2 +++ b/xen/arch/ia64/asm-offsets.c	Tue Jun 21 16:14:17 2005 +0000
     1.3 @@ -61,6 +61,7 @@ void foo(void)
     1.4  	DEFINE(XSI_PEND_OFS, offsetof(vcpu_info_t, arch.pending_interruption));
     1.5  	DEFINE(XSI_RR0_OFS, offsetof(vcpu_info_t, arch.rrs[0]));
     1.6  	DEFINE(XSI_TPR_OFS, offsetof(vcpu_info_t, arch.tpr));
     1.7 +	DEFINE(XSI_ITV_OFS, offsetof(vcpu_info_t, arch.itv));
     1.8  	//DEFINE(IA64_TASK_BLOCKED_OFFSET,offsetof (struct task_struct, blocked));
     1.9  	//DEFINE(IA64_TASK_CLEAR_CHILD_TID_OFFSET,offsetof (struct task_struct, clear_child_tid));
    1.10  	//DEFINE(IA64_TASK_GROUP_LEADER_OFFSET, offsetof (struct task_struct, group_leader));
    1.11 @@ -83,6 +84,7 @@ void foo(void)
    1.12  	DEFINE(IA64_VCPU_STARTING_RID_OFFSET, offsetof (struct vcpu, arch.starting_rid));
    1.13  	DEFINE(IA64_VCPU_ENDING_RID_OFFSET, offsetof (struct vcpu, arch.ending_rid));
    1.14  	DEFINE(IA64_VCPU_DOMAIN_ITM_OFFSET, offsetof (struct vcpu, arch.domain_itm));
    1.15 +	DEFINE(IA64_VCPU_DOMAIN_ITM_LAST_OFFSET, offsetof (struct vcpu, arch.domain_itm_last));
    1.16  
    1.17  	BLANK();
    1.18  	DEFINE(IA64_CPUINFO_ITM_NEXT_OFFSET, offsetof (struct cpuinfo_ia64, itm_next));
     2.1 --- a/xen/arch/ia64/hyperprivop.S	Tue Jun 21 15:56:07 2005 +0000
     2.2 +++ b/xen/arch/ia64/hyperprivop.S	Tue Jun 21 16:14:17 2005 +0000
     2.3 @@ -606,11 +606,6 @@ ENTRY(hyper_set_tpr)
     2.4  	;;
     2.5  END(hyper_set_tpr)
     2.6  
     2.7 -#if 1
     2.8 -// This seems to work, but I saw a flurry of "timer tick before it's due"
     2.9 -// so will leave the old version around until this gets understood/tracked down
    2.10 -// Also, vcpu_get_ivr provides a domain "heartbeat" for debugging, so we
    2.11 -// need to be able to easily turn that back on.
    2.12  ENTRY(hyper_get_ivr)
    2.13  #ifdef FAST_HYPERPRIVOP_CNT
    2.14  	movl r22=fast_hyperpriv_cnt+(8*XEN_HYPER_GET_IVR);;
    2.15 @@ -618,17 +613,16 @@ ENTRY(hyper_get_ivr)
    2.16  	adds r21=1,r21;;
    2.17  	st8 [r22]=r21;;
    2.18  #endif
    2.19 -	mov r30=r0;;
    2.20  	mov r8=15;;
    2.21  	// when we get to here r20=~=interrupts pending
    2.22  	cmp.eq p7,p0=r20,r0;;
    2.23  (p7)	adds r20=XSI_PEND_OFS-XSI_PSR_IC_OFS,r18 ;;
    2.24 -(p7)	st4 [r20]=r30;;
    2.25 +(p7)	st4 [r20]=r0;;
    2.26  (p7)	br.spnt.many 1f ;;
    2.27 -	mov r22=IA64_KR(CURRENT);;
    2.28 -	adds r24=IA64_VCPU_INSVC3_OFFSET,r22;;
    2.29 +	mov r30=IA64_KR(CURRENT);;
    2.30 +	adds r24=IA64_VCPU_INSVC3_OFFSET,r30;;
    2.31  	mov r25=192
    2.32 -	adds r22=IA64_VCPU_IRR3_OFFSET,r22;;
    2.33 +	adds r22=IA64_VCPU_IRR3_OFFSET,r30;;
    2.34  	ld8 r23=[r22];;
    2.35  	cmp.eq p6,p0=r23,r0;;
    2.36  (p6)	adds r22=-8,r22;;
    2.37 @@ -693,6 +687,16 @@ ENTRY(hyper_get_ivr)
    2.38  	andcm r25=r25,r27;;
    2.39  	st8 [r22]=r25;;
    2.40  	mov r8=r26;;
    2.41 +	// if its a clock tick, remember itm to avoid delivering it twice
    2.42 +	adds r20=XSI_ITV_OFS-XSI_PSR_IC_OFS,r18 ;;
    2.43 +	ld8 r20=[r20];;
    2.44 +	extr.u r20=r20,0,8;;
    2.45 +	cmp.eq p6,p0=r20,r8
    2.46 +	adds r22=IA64_VCPU_DOMAIN_ITM_LAST_OFFSET,r30
    2.47 +	adds r23=IA64_VCPU_DOMAIN_ITM_OFFSET,r30;;
    2.48 +	ld8 r23=[r23];;
    2.49 +(p6)	st8 [r22]=r23;;
    2.50 +	// all done
    2.51  1:	mov r24=cr.ipsr
    2.52  	mov r25=cr.iip;;
    2.53  	extr.u r26=r24,41,2 ;;
    2.54 @@ -709,44 +713,6 @@ 1:	mov r24=cr.ipsr
    2.55  	rfi
    2.56  	;;
    2.57  END(hyper_get_ivr)
    2.58 -#else
    2.59 -// This version goes to slow path unless all irr bits are zero, in which
    2.60 -// case it simply returns SPURIOUS and sets pending to zero.  Since a domain
    2.61 -// gets cr.ivr approx twice per interrupt (once to get the vector and
    2.62 -// once to see if there are any more), this version still gets used
    2.63 -// for approximately half of all gets of cr.ivr
    2.64 -ENTRY(hyper_get_ivr)
    2.65 -	// when we get to here r20=~=interrupts pending
    2.66 -	cmp.ne p7,p0=r20,r0
    2.67 -(p7)	br.spnt.many dispatch_break_fault ;;
    2.68 -#ifdef FAST_HYPERPRIVOP_CNT
    2.69 -	movl r20=fast_hyperpriv_cnt+(8*XEN_HYPER_GET_IVR);;
    2.70 -	ld8 r21=[r20];;
    2.71 -	adds r21=1,r21;;
    2.72 -	st8 [r20]=r21;;
    2.73 -#endif
    2.74 -// if we get to here, there are no interrupts pending so we
    2.75 -// force pending to zero and return SPURIOUS_VECTOR
    2.76 -	adds r20=XSI_PEND_OFS-XSI_PSR_IC_OFS,r18 ;;
    2.77 -	st4 [r20]=r0;;
    2.78 -	mov r8=15;;
    2.79 -	mov r24=cr.ipsr
    2.80 -	mov r25=cr.iip;;
    2.81 -	extr.u r26=r24,41,2 ;;
    2.82 -	cmp.eq p6,p7=2,r26 ;;
    2.83 -(p6)	mov r26=0
    2.84 -(p6)	adds r25=16,r25
    2.85 -(p7)	adds r26=1,r26
    2.86 -	;;
    2.87 -	dep r24=r26,r24,41,2
    2.88 -	;;
    2.89 -	mov cr.ipsr=r24
    2.90 -	mov cr.iip=r25
    2.91 -	mov pr=r31,-1 ;;
    2.92 -	rfi
    2.93 -	;;
    2.94 -END(hyper_get_ivr)
    2.95 -#endif
    2.96  
    2.97  ENTRY(hyper_eoi)
    2.98  	// when we get to here r20=~=interrupts pending