ia64/xen-unstable

view linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S @ 14100:e47738923a05

[LINUX] Purge include <linux/config.h>. It has been obsolete for some time now.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Fri Feb 23 16:56:45 2007 +0000 (2007-02-23)
parents efaf9c2de07e
children
line source
1 /*
2 * Support routines for Xen hypercalls
3 *
4 * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
5 */
7 #include <asm/processor.h>
8 #include <asm/asmmacro.h>
10 GLOBAL_ENTRY(xen_get_psr)
11 XEN_HYPER_GET_PSR
12 br.ret.sptk.many rp
13 ;;
14 END(xen_get_psr)
16 GLOBAL_ENTRY(xen_get_ivr)
17 XEN_HYPER_GET_IVR
18 br.ret.sptk.many rp
19 ;;
20 END(xen_get_ivr)
22 GLOBAL_ENTRY(xen_get_tpr)
23 XEN_HYPER_GET_TPR
24 br.ret.sptk.many rp
25 ;;
26 END(xen_get_tpr)
28 GLOBAL_ENTRY(xen_set_tpr)
29 mov r8=r32
30 XEN_HYPER_SET_TPR
31 br.ret.sptk.many rp
32 ;;
33 END(xen_set_tpr)
35 GLOBAL_ENTRY(xen_eoi)
36 mov r8=r32
37 XEN_HYPER_EOI
38 br.ret.sptk.many rp
39 ;;
40 END(xen_eoi)
42 GLOBAL_ENTRY(xen_thash)
43 mov r8=r32
44 XEN_HYPER_THASH
45 br.ret.sptk.many rp
46 ;;
47 END(xen_thash)
49 GLOBAL_ENTRY(xen_set_itm)
50 mov r8=r32
51 XEN_HYPER_SET_ITM
52 br.ret.sptk.many rp
53 ;;
54 END(xen_set_itm)
56 GLOBAL_ENTRY(xen_ptcga)
57 mov r8=r32
58 mov r9=r33
59 XEN_HYPER_PTC_GA
60 br.ret.sptk.many rp
61 ;;
62 END(xen_ptcga)
64 GLOBAL_ENTRY(xen_get_rr)
65 mov r8=r32
66 XEN_HYPER_GET_RR
67 br.ret.sptk.many rp
68 ;;
69 END(xen_get_rr)
71 GLOBAL_ENTRY(xen_set_rr)
72 mov r8=r32
73 mov r9=r33
74 XEN_HYPER_SET_RR
75 br.ret.sptk.many rp
76 ;;
77 END(xen_set_rr)
79 GLOBAL_ENTRY(xen_set_kr)
80 mov r8=r32
81 mov r9=r33
82 XEN_HYPER_SET_KR
83 br.ret.sptk.many rp
84 END(xen_set_kr)
86 GLOBAL_ENTRY(xen_fc)
87 mov r8=r32
88 XEN_HYPER_FC
89 br.ret.sptk.many rp
90 END(xen_fc)
92 GLOBAL_ENTRY(xen_get_cpuid)
93 mov r8=r32
94 XEN_HYPER_GET_CPUID
95 br.ret.sptk.many rp
96 END(xen_get_cpuid)
98 GLOBAL_ENTRY(xen_get_pmd)
99 mov r8=r32
100 XEN_HYPER_GET_PMD
101 br.ret.sptk.many rp
102 END(xen_get_pmd)
104 #ifdef CONFIG_IA32_SUPPORT
105 GLOBAL_ENTRY(xen_get_eflag)
106 XEN_HYPER_GET_EFLAG
107 br.ret.sptk.many rp
108 END(xen_get_eflag)
110 // some bits aren't set if pl!=0, see SDM vol1 3.1.8
111 GLOBAL_ENTRY(xen_set_eflag)
112 mov r8=r32
113 XEN_HYPER_SET_EFLAG
114 br.ret.sptk.many rp
115 END(xen_set_eflag)
116 #endif
118 GLOBAL_ENTRY(xen_send_ipi)
119 mov r14=r32
120 mov r15=r33
121 mov r2=0x400
122 break 0x1000
123 ;;
124 br.ret.sptk.many rp
125 ;;
126 END(xen_send_ipi)
128 #ifdef CONFIG_XEN_IA64_VDSO_PARAVIRT
129 // Those are vdso specialized.
130 // In fsys mode, call, ret can't be used.
132 // see xen_ssm_i() in privop.h
133 // r22 = &vcpu->vcpu_info->evtchn_upcall_mask
134 // r23 = &vpsr.ic
135 // r24 = &vcpu->vcpu_info->evtchn_upcall_pending
136 // r25 = tmp
137 // r31 = tmp
138 // p11 = tmp
139 // p14 = tmp
140 #define XEN_SET_PSR_I \
141 ld1 r31=[r22]; \
142 ld1 r25=[r24]; \
143 ;; \
144 st1 [r22]=r0; \
145 cmp.ne.unc p14,p0=r0,r31; \
146 ;; \
147 (p14) cmp.ne.unc p11,p0=r0,r25; \
148 ;; \
149 (p11) st1 [r22]=r20; \
150 (p11) XEN_HYPER_SSM_I;
152 GLOBAL_ENTRY(xen_ssm_i_0)
153 XEN_SET_PSR_I
154 brl.cond.sptk .vdso_ssm_i_0_ret
155 ;;
156 END(xen_ssm_i_0)
158 GLOBAL_ENTRY(xen_ssm_i_1)
159 XEN_SET_PSR_I
160 brl.cond.sptk .vdso_ssm_i_1_ret
161 ;;
162 END(xen_ssm_i_1)
164 GLOBAL_ENTRY(__hypercall)
165 mov r2=r37
166 break 0x1000
167 br.ret.sptk.many b0
168 ;;
169 END(__hypercall)
170 #endif