ia64/xen-unstable

view linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S @ 9296:f85bb99187bf

Update interface documentation to include sched_op_new hypercall
and clean up the style a bit. Also clean up the sched_op_new
description in the sched.h public header.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Mar 15 19:19:22 2006 +0100 (2006-03-15)
parents 0ba10f7fef51
children bbfbb9e09b55
line source
1 /*
2 * Support routines for Xen hypercalls
3 *
4 * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
5 */
7 #include <linux/config.h>
8 #include <asm/processor.h>
9 #include <asm/asmmacro.h>
11 GLOBAL_ENTRY(xen_get_ivr)
12 movl r8=running_on_xen;;
13 ld4 r8=[r8];;
14 cmp.eq p7,p0=r8,r0;;
15 (p7) mov r8=cr.ivr;;
16 (p7) br.ret.sptk.many rp
17 ;;
18 movl r9=XSI_PSR_IC
19 ;;
20 ld8 r10=[r9]
21 ;;
22 st8 [r9]=r0
23 ;;
24 XEN_HYPER_GET_IVR
25 ;;
26 st8 [r9]=r10
27 br.ret.sptk.many rp
28 ;;
29 END(xen_get_ivr)
31 GLOBAL_ENTRY(xen_get_tpr)
32 movl r8=running_on_xen;;
33 ld4 r8=[r8];;
34 cmp.eq p7,p0=r8,r0;;
35 (p7) mov r8=cr.tpr;;
36 (p7) br.ret.sptk.many rp
37 ;;
38 movl r9=XSI_PSR_IC
39 ;;
40 ld8 r10=[r9]
41 ;;
42 st8 [r9]=r0
43 ;;
44 XEN_HYPER_GET_TPR
45 ;;
46 st8 [r9]=r10
47 br.ret.sptk.many rp
48 ;;
49 END(xen_get_tpr)
51 GLOBAL_ENTRY(xen_set_tpr)
52 movl r8=running_on_xen;;
53 ld4 r8=[r8];;
54 cmp.eq p7,p0=r8,r0;;
55 (p7) mov cr.tpr=r32;;
56 (p7) br.ret.sptk.many rp
57 ;;
58 movl r9=XSI_PSR_IC
59 mov r8=r32
60 ;;
61 ld8 r10=[r9]
62 ;;
63 st8 [r9]=r0
64 ;;
65 XEN_HYPER_SET_TPR
66 ;;
67 st8 [r9]=r10
68 br.ret.sptk.many rp
69 ;;
70 END(xen_set_tpr)
72 GLOBAL_ENTRY(xen_eoi)
73 movl r8=running_on_xen;;
74 ld4 r8=[r8];;
75 cmp.eq p7,p0=r8,r0;;
76 (p7) mov cr.eoi=r0;;
77 (p7) br.ret.sptk.many rp
78 ;;
79 movl r9=XSI_PSR_IC
80 mov r8=r32
81 ;;
82 ld8 r10=[r9]
83 ;;
84 st8 [r9]=r0
85 ;;
86 XEN_HYPER_EOI
87 ;;
88 st8 [r9]=r10
89 br.ret.sptk.many rp
90 ;;
91 END(xen_eoi)
93 GLOBAL_ENTRY(xen_thash)
94 movl r8=running_on_xen;;
95 ld4 r8=[r8];;
96 cmp.eq p7,p0=r8,r0;;
97 (p7) thash r8=r32;;
98 (p7) br.ret.sptk.many rp
99 ;;
100 movl r9=XSI_PSR_IC
101 mov r8=r32
102 ;;
103 ld8 r10=[r9]
104 ;;
105 st8 [r9]=r0
106 ;;
107 XEN_HYPER_THASH
108 ;;
109 st8 [r9]=r10
110 ;;
111 br.ret.sptk.many rp
112 ;;
113 END(xen_thash)
115 GLOBAL_ENTRY(xen_set_itm)
116 movl r8=running_on_xen;;
117 ld4 r8=[r8];;
118 cmp.eq p7,p0=r8,r0;;
119 (p7) mov cr.itm=r32;;
120 (p7) br.ret.sptk.many rp
121 ;;
122 movl r9=XSI_PSR_IC
123 mov r8=r32
124 ;;
125 ld8 r10=[r9]
126 ;;
127 st8 [r9]=r0
128 ;;
129 XEN_HYPER_SET_ITM
130 ;;
131 st8 [r9]=r10
132 ;;
133 br.ret.sptk.many rp
134 ;;
135 END(xen_set_itm)
137 GLOBAL_ENTRY(xen_ptcga)
138 movl r8=running_on_xen;;
139 ld4 r8=[r8];;
140 cmp.eq p7,p0=r8,r0;;
141 (p7) ptc.ga r32,r33;;
142 (p7) br.ret.sptk.many rp
143 ;;
144 movl r11=XSI_PSR_IC
145 mov r8=r32
146 mov r9=r33
147 ;;
148 ld8 r10=[r11]
149 ;;
150 st8 [r11]=r0
151 ;;
152 XEN_HYPER_PTC_GA
153 ;;
154 st8 [r11]=r10
155 ;;
156 br.ret.sptk.many rp
157 ;;
158 END(xen_ptcga)
160 GLOBAL_ENTRY(xen_get_rr)
161 movl r8=running_on_xen;;
162 ld4 r8=[r8];;
163 cmp.eq p7,p0=r8,r0;;
164 (p7) mov r8=rr[r32];;
165 (p7) br.ret.sptk.many rp
166 ;;
167 movl r9=XSI_PSR_IC
168 mov r8=r32
169 ;;
170 ld8 r10=[r9]
171 ;;
172 st8 [r9]=r0
173 ;;
174 XEN_HYPER_GET_RR
175 ;;
176 st8 [r9]=r10
177 ;;
178 br.ret.sptk.many rp
179 ;;
180 END(xen_get_rr)
182 GLOBAL_ENTRY(xen_set_rr)
183 movl r8=running_on_xen;;
184 ld4 r8=[r8];;
185 cmp.eq p7,p0=r8,r0;;
186 (p7) mov rr[r32]=r33;;
187 (p7) br.ret.sptk.many rp
188 ;;
189 movl r11=XSI_PSR_IC
190 mov r8=r32
191 mov r9=r33
192 ;;
193 ld8 r10=[r11]
194 ;;
195 st8 [r11]=r0
196 ;;
197 XEN_HYPER_SET_RR
198 ;;
199 st8 [r11]=r10
200 ;;
201 br.ret.sptk.many rp
202 ;;
203 END(xen_set_rr)
205 GLOBAL_ENTRY(xen_set_kr)
206 movl r8=running_on_xen;;
207 ld4 r8=[r8];;
208 cmp.ne p7,p0=r8,r0;;
209 (p7) br.cond.spnt.few 1f;
210 ;;
211 cmp.eq p7,p0=r8,r0
212 adds r8=-1,r8;;
213 (p7) mov ar0=r9
214 (p7) br.ret.sptk.many rp;;
215 cmp.eq p7,p0=r8,r0
216 adds r8=-1,r8;;
217 (p7) mov ar1=r9
218 (p7) br.ret.sptk.many rp;;
219 cmp.eq p7,p0=r8,r0
220 adds r8=-1,r8;;
221 (p7) mov ar2=r9
222 (p7) br.ret.sptk.many rp;;
223 cmp.eq p7,p0=r8,r0
224 adds r8=-1,r8;;
225 (p7) mov ar3=r9
226 (p7) br.ret.sptk.many rp;;
227 cmp.eq p7,p0=r8,r0
228 adds r8=-1,r8;;
229 (p7) mov ar4=r9
230 (p7) br.ret.sptk.many rp;;
231 cmp.eq p7,p0=r8,r0
232 adds r8=-1,r8;;
233 (p7) mov ar5=r9
234 (p7) br.ret.sptk.many rp;;
235 cmp.eq p7,p0=r8,r0
236 adds r8=-1,r8;;
237 (p7) mov ar6=r9
238 (p7) br.ret.sptk.many rp;;
239 cmp.eq p7,p0=r8,r0
240 adds r8=-1,r8;;
241 (p7) mov ar7=r9
242 (p7) br.ret.sptk.many rp;;
244 1: movl r11=XSI_PSR_IC
245 mov r8=r32
246 mov r9=r33
247 ;;
248 ld8 r10=[r11]
249 ;;
250 st8 [r11]=r0
251 ;;
252 XEN_HYPER_SET_KR
253 ;;
254 st8 [r11]=r10
255 ;;
256 br.ret.sptk.many rp
257 ;;
258 END(xen_set_rr)
260 GLOBAL_ENTRY(xen_fc)
261 movl r8=running_on_xen;;
262 ld4 r8=[r8];;
263 cmp.eq p7,p0=r8,r0;;
264 (p7) fc r32;;
265 (p7) br.ret.sptk.many rp
266 ;;
267 ptc.e r96 // this is a "privified" fc r32
268 ;;
269 br.ret.sptk.many rp
270 END(xen_fc)
272 GLOBAL_ENTRY(xen_get_cpuid)
273 movl r8=running_on_xen;;
274 ld4 r8=[r8];;
275 cmp.eq p7,p0=r8,r0;;
276 (p7) mov r8=cpuid[r32];;
277 (p7) br.ret.sptk.many rp
278 ;;
279 mov r72=rr[r32] // this is a "privified" mov r8=cpuid[r32]
280 ;;
281 br.ret.sptk.many rp
282 END(xen_get_cpuid)
284 GLOBAL_ENTRY(xen_get_pmd)
285 movl r8=running_on_xen;;
286 ld4 r8=[r8];;
287 cmp.eq p7,p0=r8,r0;;
288 (p7) mov r8=pmd[r32];;
289 (p7) br.ret.sptk.many rp
290 ;;
291 mov r72=pmc[r32] // this is a "privified" mov r8=pmd[r32]
292 ;;
293 br.ret.sptk.many rp
294 END(xen_get_pmd)
296 #ifdef CONFIG_IA32_SUPPORT
297 GLOBAL_ENTRY(xen_get_eflag)
298 movl r8=running_on_xen;;
299 ld4 r8=[r8];;
300 cmp.eq p7,p0=r8,r0;;
301 (p7) mov r8=ar24;;
302 (p7) br.ret.sptk.many rp
303 ;;
304 mov ar24=r72 // this is a "privified" mov r8=ar.eflg
305 ;;
306 br.ret.sptk.many rp
307 END(xen_get_eflag)
308 // some bits aren't set if pl!=0, see SDM vol1 3.1.8
309 GLOBAL_ENTRY(xen_set_eflag)
310 movl r8=running_on_xen;;
311 ld4 r8=[r8];;
312 cmp.eq p7,p0=r8,r0;;
313 (p7) mov ar24=r32
314 (p7) br.ret.sptk.many rp
315 ;;
316 // FIXME: this remains no-op'd because it generates
317 // a privileged register (general exception) trap rather than
318 // a privileged operation fault
319 //mov ar24=r32
320 ;;
321 br.ret.sptk.many rp
322 END(xen_get_eflag)
323 #endif