ia64/xen-unstable

changeset 13440:efaf9c2de07e

[IA64] Remove duplicate check is_running_on_xen

When these functions are called, it is running on XEN.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
author awilliam@xenbuild2.aw
date Wed Jan 17 19:51:40 2007 -0700 (2007-01-17)
parents 2056bc71fa55
children 7e9077dd4010
files linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S	Wed Jan 17 19:48:02 2007 -0700
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S	Wed Jan 17 19:51:40 2007 -0700
     1.3 @@ -9,267 +9,109 @@
     1.4  #include <asm/asmmacro.h>
     1.5  
     1.6  GLOBAL_ENTRY(xen_get_psr)
     1.7 -	movl r8=running_on_xen;;
     1.8 -	ld4 r8=[r8];;
     1.9 -	cmp.eq p7,p0=r8,r0;;
    1.10 -(p7)	mov r8=psr;;
    1.11 -(p7)	br.ret.sptk.many rp
    1.12 -	;;
    1.13  	XEN_HYPER_GET_PSR
    1.14 -	;;
    1.15  	br.ret.sptk.many rp
    1.16 -	;;
    1.17 +    ;;
    1.18  END(xen_get_psr)
    1.19  
    1.20  GLOBAL_ENTRY(xen_get_ivr)
    1.21 -	movl r8=running_on_xen;;
    1.22 -	ld4 r8=[r8];;
    1.23 -	cmp.eq p7,p0=r8,r0;;
    1.24 -(p7)	mov r8=cr.ivr;;
    1.25 -(p7)	br.ret.sptk.many rp
    1.26 -	;;
    1.27  	XEN_HYPER_GET_IVR
    1.28 -	;;
    1.29  	br.ret.sptk.many rp
    1.30  	;;
    1.31  END(xen_get_ivr)
    1.32  
    1.33  GLOBAL_ENTRY(xen_get_tpr)
    1.34 -	movl r8=running_on_xen;;
    1.35 -	ld4 r8=[r8];;
    1.36 -	cmp.eq p7,p0=r8,r0;;
    1.37 -(p7)	mov r8=cr.tpr;;
    1.38 -(p7)	br.ret.sptk.many rp
    1.39 -	;;
    1.40  	XEN_HYPER_GET_TPR
    1.41 -	;;
    1.42  	br.ret.sptk.many rp
    1.43  	;;
    1.44  END(xen_get_tpr)
    1.45  
    1.46  GLOBAL_ENTRY(xen_set_tpr)
    1.47 -	movl r8=running_on_xen;;
    1.48 -	ld4 r8=[r8];;
    1.49 -	cmp.eq p7,p0=r8,r0;;
    1.50 -(p7)	mov cr.tpr=r32;;
    1.51 -(p7)	br.ret.sptk.many rp
    1.52 -	;;
    1.53  	mov r8=r32
    1.54 -	;;
    1.55  	XEN_HYPER_SET_TPR
    1.56 -	;;
    1.57  	br.ret.sptk.many rp
    1.58  	;;
    1.59  END(xen_set_tpr)
    1.60  
    1.61  GLOBAL_ENTRY(xen_eoi)
    1.62 -	movl r8=running_on_xen;;
    1.63 -	ld4 r8=[r8];;
    1.64 -	cmp.eq p7,p0=r8,r0;;
    1.65 -(p7)	mov cr.eoi=r0;;
    1.66 -(p7)	br.ret.sptk.many rp
    1.67 -	;;
    1.68  	mov r8=r32
    1.69 -	;;
    1.70  	XEN_HYPER_EOI
    1.71 -	;;
    1.72  	br.ret.sptk.many rp
    1.73  	;;
    1.74  END(xen_eoi)
    1.75  
    1.76  GLOBAL_ENTRY(xen_thash)
    1.77 -	movl r8=running_on_xen;;
    1.78 -	ld4 r8=[r8];;
    1.79 -	cmp.eq p7,p0=r8,r0;;
    1.80 -(p7)	thash r8=r32;;
    1.81 -(p7)	br.ret.sptk.many rp
    1.82 -	;;
    1.83  	mov r8=r32
    1.84 -	;;
    1.85  	XEN_HYPER_THASH
    1.86 -	;;
    1.87  	br.ret.sptk.many rp
    1.88  	;;
    1.89  END(xen_thash)
    1.90  
    1.91  GLOBAL_ENTRY(xen_set_itm)
    1.92 -	movl r8=running_on_xen;;
    1.93 -	ld4 r8=[r8];;
    1.94 -	cmp.eq p7,p0=r8,r0;;
    1.95 -(p7)	mov cr.itm=r32;;
    1.96 -(p7)	br.ret.sptk.many rp
    1.97 -	;;
    1.98  	mov r8=r32
    1.99 -	;;
   1.100  	XEN_HYPER_SET_ITM
   1.101 -	;;
   1.102  	br.ret.sptk.many rp
   1.103  	;;
   1.104  END(xen_set_itm)
   1.105  
   1.106  GLOBAL_ENTRY(xen_ptcga)
   1.107 -	movl r8=running_on_xen;;
   1.108 -	ld4 r8=[r8];;
   1.109 -	cmp.eq p7,p0=r8,r0;;
   1.110 -(p7)	ptc.ga r32,r33;;
   1.111 -(p7)	br.ret.sptk.many rp
   1.112 -	;;
   1.113  	mov r8=r32
   1.114  	mov r9=r33
   1.115 -	;;
   1.116  	XEN_HYPER_PTC_GA
   1.117 -	;;
   1.118  	br.ret.sptk.many rp
   1.119  	;;
   1.120  END(xen_ptcga)
   1.121  
   1.122  GLOBAL_ENTRY(xen_get_rr)
   1.123 -	movl r8=running_on_xen;;
   1.124 -	ld4 r8=[r8];;
   1.125 -	cmp.eq p7,p0=r8,r0;;
   1.126 -(p7)	mov r8=rr[r32];;
   1.127 -(p7)	br.ret.sptk.many rp
   1.128 -	;;
   1.129  	mov r8=r32
   1.130 -	;;
   1.131  	XEN_HYPER_GET_RR
   1.132 -	;;
   1.133  	br.ret.sptk.many rp
   1.134  	;;
   1.135  END(xen_get_rr)
   1.136  
   1.137  GLOBAL_ENTRY(xen_set_rr)
   1.138 -	movl r8=running_on_xen;;
   1.139 -	ld4 r8=[r8];;
   1.140 -	cmp.eq p7,p0=r8,r0;;
   1.141 -(p7)	mov rr[r32]=r33;;
   1.142 -(p7)	br.ret.sptk.many rp
   1.143 -	;;
   1.144  	mov r8=r32
   1.145  	mov r9=r33
   1.146 -	;;
   1.147  	XEN_HYPER_SET_RR
   1.148 -	;;
   1.149  	br.ret.sptk.many rp
   1.150  	;;
   1.151  END(xen_set_rr)
   1.152  
   1.153  GLOBAL_ENTRY(xen_set_kr)
   1.154 -	movl r8=running_on_xen;;
   1.155 -	ld4 r8=[r8];;
   1.156 -	cmp.ne p7,p0=r8,r0;;
   1.157 -(p7)	br.cond.spnt.few 1f;
   1.158 -	;;
   1.159 -	cmp.eq p7,p0=r8,r0
   1.160 -	adds r8=-1,r8;;
   1.161 -(p7)	mov ar0=r9
   1.162 -(p7)	br.ret.sptk.many rp;;
   1.163 -	cmp.eq p7,p0=r8,r0
   1.164 -	adds r8=-1,r8;;
   1.165 -(p7)	mov ar1=r9
   1.166 -(p7)	br.ret.sptk.many rp;;
   1.167 -	cmp.eq p7,p0=r8,r0
   1.168 -	adds r8=-1,r8;;
   1.169 -(p7)	mov ar2=r9
   1.170 -(p7)	br.ret.sptk.many rp;;
   1.171 -	cmp.eq p7,p0=r8,r0
   1.172 -	adds r8=-1,r8;;
   1.173 -(p7)	mov ar3=r9
   1.174 -(p7)	br.ret.sptk.many rp;;
   1.175 -	cmp.eq p7,p0=r8,r0
   1.176 -	adds r8=-1,r8;;
   1.177 -(p7)	mov ar4=r9
   1.178 -(p7)	br.ret.sptk.many rp;;
   1.179 -	cmp.eq p7,p0=r8,r0
   1.180 -	adds r8=-1,r8;;
   1.181 -(p7)	mov ar5=r9
   1.182 -(p7)	br.ret.sptk.many rp;;
   1.183 -	cmp.eq p7,p0=r8,r0
   1.184 -	adds r8=-1,r8;;
   1.185 -(p7)	mov ar6=r9
   1.186 -(p7)	br.ret.sptk.many rp;;
   1.187 -	cmp.eq p7,p0=r8,r0
   1.188 -	adds r8=-1,r8;;
   1.189 -(p7)	mov ar7=r9
   1.190 -(p7)	br.ret.sptk.many rp;;
   1.191 -
   1.192 -1:	mov r8=r32
   1.193 +	mov r8=r32
   1.194  	mov r9=r33
   1.195 -	;;
   1.196  	XEN_HYPER_SET_KR
   1.197 -	;;
   1.198  	br.ret.sptk.many rp
   1.199  END(xen_set_kr)
   1.200  
   1.201  GLOBAL_ENTRY(xen_fc)
   1.202 -	movl r8=running_on_xen;;
   1.203 -	ld4 r8=[r8];;
   1.204 -	cmp.eq p7,p0=r8,r0;;
   1.205 -(p7)	fc r32;;
   1.206 -(p7)	br.ret.sptk.many rp
   1.207 -	;;
   1.208  	mov r8=r32
   1.209 -	;;
   1.210  	XEN_HYPER_FC
   1.211 -	;;
   1.212  	br.ret.sptk.many rp
   1.213  END(xen_fc)
   1.214  
   1.215  GLOBAL_ENTRY(xen_get_cpuid)
   1.216 -	movl r8=running_on_xen;;
   1.217 -	ld4 r8=[r8];;
   1.218 -	cmp.eq p7,p0=r8,r0;;
   1.219 -(p7)	mov r8=cpuid[r32];;
   1.220 -(p7)	br.ret.sptk.many rp
   1.221 -	;;
   1.222  	mov r8=r32
   1.223 -	;;
   1.224  	XEN_HYPER_GET_CPUID
   1.225 -	;;
   1.226  	br.ret.sptk.many rp
   1.227  END(xen_get_cpuid)
   1.228  
   1.229  GLOBAL_ENTRY(xen_get_pmd)
   1.230 -	movl r8=running_on_xen;;
   1.231 -	ld4 r8=[r8];;
   1.232 -	cmp.eq p7,p0=r8,r0;;
   1.233 -(p7)	mov r8=pmd[r32];;
   1.234 -(p7)	br.ret.sptk.many rp
   1.235 -	;;
   1.236  	mov r8=r32
   1.237 -	;;
   1.238  	XEN_HYPER_GET_PMD
   1.239 -	;;
   1.240  	br.ret.sptk.many rp
   1.241  END(xen_get_pmd)
   1.242  
   1.243  #ifdef CONFIG_IA32_SUPPORT
   1.244  GLOBAL_ENTRY(xen_get_eflag)
   1.245 -	movl r8=running_on_xen;;
   1.246 -	ld4 r8=[r8];;
   1.247 -	cmp.eq p7,p0=r8,r0;;
   1.248 -(p7)	mov r8=ar24;;
   1.249 -(p7)	br.ret.sptk.many rp
   1.250 -	;;
   1.251 -	mov r8=r32
   1.252 -	;;
   1.253  	XEN_HYPER_GET_EFLAG
   1.254 -	;;
   1.255  	br.ret.sptk.many rp
   1.256  END(xen_get_eflag)
   1.257  	
   1.258  // some bits aren't set if pl!=0, see SDM vol1 3.1.8
   1.259  GLOBAL_ENTRY(xen_set_eflag)
   1.260 -	movl r8=running_on_xen;;
   1.261 -	ld4 r8=[r8];;
   1.262 -	cmp.eq p7,p0=r8,r0;;
   1.263 -(p7)	mov ar24=r32
   1.264 -(p7)	br.ret.sptk.many rp
   1.265 -	;;
   1.266  	mov r8=r32
   1.267 -	;;
   1.268  	XEN_HYPER_SET_EFLAG
   1.269 -	;;
   1.270  	br.ret.sptk.many rp
   1.271  END(xen_set_eflag)
   1.272  #endif