ia64/xen-unstable

changeset 16774:36231eca00d9

[IA64] Fix MCA handling from xen relocation changes

Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
author Alex Williamson <alex.williamson@hp.com>
date Thu Jan 17 12:05:43 2008 -0700 (2008-01-17)
parents ac296153ea64
children f0b88ed504dd
files xen/arch/ia64/linux-xen/mca_asm.S
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/mca_asm.S	Thu Jan 17 12:05:43 2008 -0700
     1.2 +++ b/xen/arch/ia64/linux-xen/mca_asm.S	Thu Jan 17 12:05:43 2008 -0700
     1.3 @@ -482,32 +482,26 @@ ia64_reload_tr:
     1.4  	// avoid overlapping with xenheap TR
     1.5  	mov r17=ip
     1.6  	;;
     1.7 -	tpa r17=r17
     1.8 -	;;
     1.9  	dep r17=0,r17,0,KERNEL_TR_PAGE_SHIFT
    1.10  	;;
    1.11  	shr.u r17=r17,IA64_GRANULE_SHIFT
    1.12  	;; 
    1.13 -	GET_THIS_PADDR(r2,cpu_kr);;
    1.14 -	add r2=IA64_KR_CURRENT_OFFSET,r2;;
    1.15 -	ld8 r16=[r2];;
    1.16 -	;;
    1.17 -#if KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT
    1.18 -# error "KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT shouldn't happen"
    1.19 -#endif
    1.20 -#if KERNEL_TR_PAGE_SHIFT > IA64_GRANULE_SHIFT
    1.21 -	dep  r16=0,r16,0,KERNEL_TR_PAGE_SHIFT-IA64_GRANULE_SHIFT
    1.22 -	;;
    1.23 -#endif
    1.24 -	cmp.eq p7,p0=r17,r16
    1.25 -(p7)	br.cond.sptk	.reload_vhpt
    1.26 -	
    1.27  	// Kernel registers are saved in a per_cpu cpu_kr_ia64_t
    1.28  	// to allow the kernel registers themselves to be used by domains.
    1.29  	GET_THIS_PADDR(r2, cpu_kr);;
    1.30  	add r2=IA64_KR_CURRENT_STACK_OFFSET,r2
    1.31  	;;
    1.32  	ld8 r16=[r2]
    1.33 +	;;
    1.34 +#if KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT
    1.35 +# error "KERNEL_TR_PAGE_SHIFT < IA64_GRANULE_SHIFT shouldn't happen"
    1.36 +#endif
    1.37 +#if KERNEL_TR_PAGE_SHIFT > IA64_GRANULE_SHIFT
    1.38 +	dep  r18=0,r16,0,KERNEL_TR_PAGE_SHIFT-IA64_GRANULE_SHIFT
    1.39 +	;;
    1.40 +#endif
    1.41 +	cmp.eq p7,p0=r17,r18
    1.42 +(p7)	br.cond.sptk	.reload_vhpt
    1.43  #else
    1.44  	mov r16=IA64_KR(CURRENT_STACK)
    1.45  #endif
    1.46 @@ -535,6 +529,9 @@ ia64_reload_tr:
    1.47  #if VHPT_ENABLED
    1.48  	GET_VA_VCPU_VHPT_MADDR(r2,r3);;
    1.49  	dep r3=0,r2,0,KERNEL_TR_PAGE_SHIFT
    1.50 +	;; 
    1.51 +	dep r3=0,r3,60,4		// physical address of
    1.52 +	                                // va_vhpt & ~(KERNEL_TR_PAGE_SHIFT - 1)
    1.53  	;;
    1.54  	shr.u r3=r3,IA64_GRANULE_SHIFT
    1.55  	;;