ia64/xen-unstable

changeset 6875:c83307a81602

Remove paravirtualization of ar.kr registers (may need hyperprivop for
mov_to_kr later)
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>
author djm@kirby.fc.hp.com
date Wed Sep 21 13:41:25 2005 -0600 (2005-09-21)
parents 32eea7354dcb
children f064ce67e524
files linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S	Wed Sep 21 10:25:47 2005 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenentry.S	Wed Sep 21 13:41:25 2005 -0600
     1.3 @@ -53,13 +53,7 @@ GLOBAL_ENTRY(ia64_switch_to)
     1.4  
     1.5  	adds r22=IA64_TASK_THREAD_KSP_OFFSET,r13
     1.6  	movl r25=init_task
     1.7 -#ifdef CONFIG_XEN
     1.8 -	movl r27=XSI_KR0+(IA64_KR_CURRENT_STACK*8)
     1.9 -	;;
    1.10 -	ld8 r27=[r27]
    1.11 -#else
    1.12  	mov r27=IA64_KR(CURRENT_STACK)
    1.13 -#endif
    1.14  	adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
    1.15  	dep r20=0,in0,61,3		// physical address of "next"
    1.16  	;;
    1.17 @@ -86,13 +80,7 @@ GLOBAL_ENTRY(ia64_switch_to)
    1.18  (p6)	srlz.d
    1.19  #endif
    1.20  	ld8 sp=[r21]			// load kernel stack pointer of new task
    1.21 -#ifdef CONFIG_XEN
    1.22 -	movl r8=XSI_KR0+(IA64_KR_CURRENT*8)
    1.23 -	;;
    1.24 -	st8 [r8]=in0
    1.25 -#else
    1.26  	mov IA64_KR(CURRENT)=in0	// update "current" application register
    1.27 -#endif
    1.28  	mov r8=r13			// return pointer to previously running task
    1.29  	mov r13=in0			// set "current" pointer
    1.30  	;;
    1.31 @@ -127,16 +115,13 @@ GLOBAL_ENTRY(ia64_switch_to)
    1.32  	st8 [r8]=in0			 // VA of next task...
    1.33  	;;
    1.34  	mov r25=IA64_TR_CURRENT_STACK
    1.35 -	movl r8=XSI_KR0+(IA64_KR_CURRENT_STACK*8)
    1.36 -	;;
    1.37 -	st8 [r8]=r26
    1.38  #else
    1.39  	mov cr.itir=r25
    1.40  	mov cr.ifa=in0			// VA of next task...
    1.41  	;;
    1.42  	mov r25=IA64_TR_CURRENT_STACK
    1.43 +#endif
    1.44  	mov IA64_KR(CURRENT_STACK)=r26	// remember last page we mapped...
    1.45 -#endif
    1.46  	;;
    1.47  	itr.d dtr[r25]=r23		// wire in new mapping...
    1.48  	br.cond.sptk .done
    1.49 @@ -573,14 +558,7 @@ GLOBAL_ENTRY(ia64_leave_kernel)
    1.50  	bsw.0			// switch back to bank 0 (no stop bit required beforehand...)
    1.51  #endif
    1.52  	;;
    1.53 -#ifdef CONFIG_XEN
    1.54 -(pUStk)	movl r18=XSI_KR0+(IA64_KR_CURRENT*8)
    1.55 -	;;
    1.56 -(pUStk)	ld8 r18=[r18]
    1.57 -	;;
    1.58 -#else
    1.59  (pUStk)	mov r18=IA64_KR(CURRENT)// M2 (12 cycle read latency)
    1.60 -#endif
    1.61  	adds r16=PT(CR_IPSR)+16,r12
    1.62  	adds r17=PT(CR_IIP)+16,r12
    1.63  
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S	Wed Sep 21 10:25:47 2005 -0600
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenivt.S	Wed Sep 21 13:41:25 2005 -0600
     2.3 @@ -123,13 +123,7 @@ ENTRY(vhpt_miss)
     2.4  	rsm psr.dt				// use physical addressing for data
     2.5  #endif
     2.6  	mov r31=pr				// save the predicate registers
     2.7 -#ifdef CONFIG_XEN
     2.8 -	movl r19=XSI_KR0+(IA64_KR_PT_BASE*8)	// get the page table base address
     2.9 -	;;
    2.10 -	ld8 r19=[r19]
    2.11 -#else
    2.12  	mov r19=IA64_KR(PT_BASE)		// get page table base address
    2.13 -#endif
    2.14  	shl r21=r16,3				// shift bit 60 into sign bit
    2.15  	shr.u r17=r16,61			// get the region number into r17
    2.16  	;;
    2.17 @@ -573,13 +567,7 @@ ENTRY(nested_dtlb_miss)
    2.18  #else
    2.19  	rsm psr.dt				// switch to using physical data addressing
    2.20  #endif
    2.21 -#ifdef CONFIG_XEN
    2.22 -	movl r19=XSI_KR0+(IA64_KR_PT_BASE*8)	// get the page table base address
    2.23 -	;;
    2.24 -	ld8 r19=[r19]
    2.25 -#else
    2.26  	mov r19=IA64_KR(PT_BASE)		// get the page table base address
    2.27 -#endif
    2.28  	shl r21=r16,3				// shift bit 60 into sign bit
    2.29  	;;
    2.30  	shr.u r17=r16,61			// get the region number into r17
    2.31 @@ -968,6 +956,7 @@ ENTRY(break_fault)
    2.32  	 * to prevent leaking bits from kernel to user level.
    2.33  	 */
    2.34  	DBG_FAULT(11)
    2.35 +	mov r16=IA64_KR(CURRENT)		// r16 = current task; 12 cycle read lat.
    2.36  #ifdef CONFIG_XEN
    2.37  	movl r31=XSI_IPSR
    2.38  	;;
    2.39 @@ -983,11 +972,7 @@ ENTRY(break_fault)
    2.40  	mov r27=ar.rsc
    2.41  	mov r26=ar.pfs
    2.42  	;;
    2.43 -	adds r31=(XSI_KR0+(IA64_KR_CURRENT*8))-XSI_IIM,r31
    2.44 -	;;
    2.45 -	ld8 r16=[r31]				// r16 = current task
    2.46  #else
    2.47 -	mov r16=IA64_KR(CURRENT)		// r16 = current task; 12 cycle read lat.
    2.48  	mov r17=cr.iim
    2.49  	mov r18=__IA64_BREAK_SYSCALL
    2.50  	mov r21=ar.fpsr
     3.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h	Wed Sep 21 10:25:47 2005 -0600
     3.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h	Wed Sep 21 13:41:25 2005 -0600
     3.3 @@ -104,9 +104,7 @@
     3.4   */
     3.5  #ifdef CONFIG_XEN
     3.6  #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA)							\
     3.7 -	/*MINSTATE_GET_CURRENT(r16);	/* M (or M;;I) */					\
     3.8 -	movl r16=XSI_KR0+(IA64_KR_CURRENT*8);;							\
     3.9 -	ld8 r16=[r16];;										\
    3.10 +	MINSTATE_GET_CURRENT(r16);	/* M (or M;;I) */					\
    3.11  	mov r27=ar.rsc;			/* M */							\
    3.12  	mov r20=r1;			/* A */							\
    3.13  	mov r25=ar.unat;		/* M */							\
    3.14 @@ -194,9 +192,7 @@
    3.15  	;;											\
    3.16  .mem.offset 0,0; st8.spill [r16]=r13,16;							\
    3.17  .mem.offset 8,0; st8.spill [r17]=r21,16;	/* save ar.fpsr */				\
    3.18 -	/* mov r13=IA64_KR(CURRENT);	/* establish `current' */				\
    3.19 -	movl r21=XSI_KR0+(IA64_KR_CURRENT*8);;							\
    3.20 -	ld8 r13=[r21];;										\
    3.21 +	mov r13=IA64_KR(CURRENT);	/* establish `current' */				\
    3.22  	;;											\
    3.23  .mem.offset 0,0; st8.spill [r16]=r15,16;							\
    3.24  .mem.offset 8,0; st8.spill [r17]=r14,16;							\
     4.1 --- a/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h	Wed Sep 21 10:25:47 2005 -0600
     4.2 +++ b/linux-2.6-xen-sparse/include/asm-ia64/xen/privop.h	Wed Sep 21 13:41:25 2005 -0600
     4.3 @@ -93,9 +93,8 @@ extern void xen_set_eflag(unsigned long)
     4.4  	XEN_HYPER_SSM_I;						\
     4.5  })
     4.6  
     4.7 -/* kernel register paravirtualization may soon go away */
     4.8 -#define xen_get_kr(regnum) (((unsigned long *)(XSI_KR0))[regnum])
     4.9 -#define xen_set_kr(regnum,val) ((((unsigned long *)(XSI_KR0))[regnum]) = val)
    4.10 +// for now, just use privop.  may use hyperprivop later
    4.11 +#define xen_set_kr(regnum,val) (__ia64_setreg(regnum,val))
    4.12  
    4.13  /* turning off interrupts can be paravirtualized simply by writing
    4.14   * to a memory-mapped virtual psr.i bit (implemented as a 16-bit bool) */
    4.15 @@ -168,11 +167,6 @@ extern unsigned long xen_get_rr(unsigned
    4.16  	__u64 ia64_intri_res;						\
    4.17  									\
    4.18  	switch(regnum) {						\
    4.19 -	case _IA64_REG_AR_KR0 ... _IA64_REG_AR_KR7:			\
    4.20 -		ia64_intri_res = (running_on_xen) ?			\
    4.21 -			xen_get_kr((regnum-_IA64_REG_AR_KR0)) :		\
    4.22 -			__ia64_getreg(regnum);				\
    4.23 -		break;							\
    4.24  	case _IA64_REG_CR_IVR:						\
    4.25  		ia64_intri_res = (running_on_xen) ?			\
    4.26  			xen_get_ivr() :					\