ia64/xen-unstable

changeset 10676:d6b6d3defe81

[IA64] Fix MINSTATE_GET_CURRENT

To get virtual curent address in both physcal mode and virtual mode,
add MINSTATE_GET_CURRENT_VIRT.

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author awilliam@xenbuild.aw
date Thu Jul 06 10:42:13 2006 -0600 (2006-07-06)
parents 446402805fd9
children 7f4ec81761cf
files xen/arch/ia64/linux-xen/minstate.h
line diff
     1.1 --- a/xen/arch/ia64/linux-xen/minstate.h	Thu Jul 06 10:32:26 2006 -0600
     1.2 +++ b/xen/arch/ia64/linux-xen/minstate.h	Thu Jul 06 10:42:13 2006 -0600
     1.3 @@ -89,6 +89,7 @@
     1.4  # define MINSTATE_GET_CURRENT(reg)					\
     1.5                 movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;	\
     1.6                 ld8 reg=[reg]
     1.7 +# define MINSTATE_GET_CURRENT_VIRT(reg)	MINSTATE_GET_CURRENT(reg)
     1.8  #else
     1.9  # define MINSTATE_GET_CURRENT(reg)	mov reg=IA64_KR(CURRENT)
    1.10  #endif
    1.11 @@ -97,7 +98,19 @@
    1.12  #endif
    1.13  
    1.14  #ifdef MINSTATE_PHYS
    1.15 +# ifdef XEN
    1.16 +# define MINSTATE_GET_CURRENT(reg)					\
    1.17 +	movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;		\
    1.18 +	tpa reg=reg;;							\
    1.19 +	ld8 reg=[reg];;							\
    1.20 +	tpa reg=reg;;
    1.21 +# define MINSTATE_GET_CURRENT_VIRT(reg)					\
    1.22 +	movl reg=THIS_CPU(cpu_kr)+IA64_KR_CURRENT_OFFSET;;		\
    1.23 +	tpa reg=reg;;							\
    1.24 +	ld8 reg=[reg];;
    1.25 +#else
    1.26  # define MINSTATE_GET_CURRENT(reg)	mov reg=IA64_KR(CURRENT);; tpa reg=reg
    1.27 +#endif /* XEN */
    1.28  # define MINSTATE_START_SAVE_MIN	MINSTATE_START_SAVE_MIN_PHYS
    1.29  # define MINSTATE_END_SAVE_MIN		MINSTATE_END_SAVE_MIN_PHYS
    1.30  #endif
    1.31 @@ -200,8 +213,8 @@
    1.32  	;;											\
    1.33  .mem.offset 0,0; st8.spill [r16]=r13,16;							\
    1.34  .mem.offset 8,0; st8.spill [r17]=r21,16;	/* save ar.fpsr */				\
    1.35 -	/* XEN mov r13=IA64_KR(CURRENT);*/	/* establish `current' */				\
    1.36 -	MINSTATE_GET_CURRENT(r13);		/* XEN establish `current' */				\
    1.37 +	/* XEN mov r13=IA64_KR(CURRENT);*/	/* establish `current' */			\
    1.38 +	MINSTATE_GET_CURRENT_VIRT(r13);		/* XEN establish `current' */			\
    1.39  	;;											\
    1.40  .mem.offset 0,0; st8.spill [r16]=r15,16;							\
    1.41  .mem.offset 8,0; st8.spill [r17]=r14,16;							\