]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - arch/ia64/xen/hypercall.S
Merge branch 'next' into for-linus
[mirror_ubuntu-bionic-kernel.git] / arch / ia64 / xen / hypercall.S
1 /*
2 * Support routines for Xen hypercalls
3 *
4 * Copyright (C) 2005 Dan Magenheimer <dan.magenheimer@hp.com>
5 * Copyright (C) 2008 Yaozu (Eddie) Dong <eddie.dong@intel.com>
6 */
7
8 #include <asm/asmmacro.h>
9 #include <asm/intrinsics.h>
10 #include <asm/xen/privop.h>
11
12 #ifdef __INTEL_COMPILER
13 /*
14 * Hypercalls without parameter.
15 */
16 #define __HCALL0(name,hcall) \
17 GLOBAL_ENTRY(name); \
18 break hcall; \
19 br.ret.sptk.many rp; \
20 END(name)
21
22 /*
23 * Hypercalls with 1 parameter.
24 */
25 #define __HCALL1(name,hcall) \
26 GLOBAL_ENTRY(name); \
27 mov r8=r32; \
28 break hcall; \
29 br.ret.sptk.many rp; \
30 END(name)
31
32 /*
33 * Hypercalls with 2 parameters.
34 */
35 #define __HCALL2(name,hcall) \
36 GLOBAL_ENTRY(name); \
37 mov r8=r32; \
38 mov r9=r33; \
39 break hcall; \
40 br.ret.sptk.many rp; \
41 END(name)
42
43 __HCALL0(xen_get_psr, HYPERPRIVOP_GET_PSR)
44 __HCALL0(xen_get_ivr, HYPERPRIVOP_GET_IVR)
45 __HCALL0(xen_get_tpr, HYPERPRIVOP_GET_TPR)
46 __HCALL0(xen_hyper_ssm_i, HYPERPRIVOP_SSM_I)
47
48 __HCALL1(xen_set_tpr, HYPERPRIVOP_SET_TPR)
49 __HCALL1(xen_eoi, HYPERPRIVOP_EOI)
50 __HCALL1(xen_thash, HYPERPRIVOP_THASH)
51 __HCALL1(xen_set_itm, HYPERPRIVOP_SET_ITM)
52 __HCALL1(xen_get_rr, HYPERPRIVOP_GET_RR)
53 __HCALL1(xen_fc, HYPERPRIVOP_FC)
54 __HCALL1(xen_get_cpuid, HYPERPRIVOP_GET_CPUID)
55 __HCALL1(xen_get_pmd, HYPERPRIVOP_GET_PMD)
56
57 __HCALL2(xen_ptcga, HYPERPRIVOP_PTC_GA)
58 __HCALL2(xen_set_rr, HYPERPRIVOP_SET_RR)
59 __HCALL2(xen_set_kr, HYPERPRIVOP_SET_KR)
60
61 GLOBAL_ENTRY(xen_set_rr0_to_rr4)
62 mov r8=r32
63 mov r9=r33
64 mov r10=r34
65 mov r11=r35
66 mov r14=r36
67 XEN_HYPER_SET_RR0_TO_RR4
68 br.ret.sptk.many rp
69 ;;
70 END(xen_set_rr0_to_rr4)
71 #endif
72
73 GLOBAL_ENTRY(xen_send_ipi)
74 mov r14=r32
75 mov r15=r33
76 mov r2=0x400
77 break 0x1000
78 ;;
79 br.ret.sptk.many rp
80 ;;
81 END(xen_send_ipi)
82
83 GLOBAL_ENTRY(__hypercall)
84 mov r2=r37
85 break 0x1000
86 br.ret.sptk.many b0
87 ;;
88 END(__hypercall)