win-pvdrivers

view xenpci/hypercall_ia64.h @ 1013:43e76afb2398

Fix compiler warnings under 2000
author James Harper <james.harper@bendigoit.com.au>
date Mon Feb 11 20:59:11 2013 +1100 (2013-02-11)
parents 3fb323edeea9
children
line source
1 /*
2 PV Drivers for Windows Xen HVM Domains
3 Copyright (C) 2007 James Harper
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
20 extern int _hypercall2(VOID *address, xen_ulong_t a1, xen_ulong_t a2);
21 extern int _hypercall3(VOID *address, xen_ulong_t a1, xen_ulong_t a2, xen_ulong_t a3);
23 static __inline int
24 HYPERVISOR_memory_op(PXENPCI_DEVICE_DATA xpdd, int cmd, void *arg)
25 {
26 PCHAR memory_op_func = xpdd->hypercall_stubs;
27 memory_op_func += __HYPERVISOR_memory_op * 32;
28 return _hypercall2(memory_op_func, (xen_ulong_t)cmd, (xen_ulong_t)arg);
29 }
31 static __inline int
32 HYPERVISOR_xen_version(PXENPCI_DEVICE_DATA xpdd, int cmd, void *arg)
33 {
34 PCHAR xen_version_func = xpdd->hypercall_stubs;
35 xen_version_func += __HYPERVISOR_xen_version * 32;
36 return _hypercall2(xen_version_func, (xen_ulong_t)cmd, (xen_ulong_t)arg);
37 }
39 static __inline int
40 HYPERVISOR_grant_table_op(PXENPCI_DEVICE_DATA xpdd, int cmd, void *uop, unsigned int count)
41 {
42 PCHAR grant_table_op_func = xpdd->hypercall_stubs;
43 grant_table_op_func += __HYPERVISOR_grant_table_op * 32;
44 return _hypercall3(grant_table_op_func, (xen_ulong_t)cmd, (xen_ulong_t)uop, (xen_ulong_t)count);
45 }
47 static __inline int
48 HYPERVISOR_hvm_op(PXENPCI_DEVICE_DATA xpdd, int op, struct xen_hvm_param *arg)
49 {
50 PCHAR hvm_op_func = xpdd->hypercall_stubs;
51 hvm_op_func += __HYPERVISOR_hvm_op * 32;
52 return _hypercall2(hvm_op_func, (xen_ulong_t)op, (xen_ulong_t)arg);
53 }
55 static __inline int
56 HYPERVISOR_event_channel_op(PXENPCI_DEVICE_DATA xpdd, int cmd, void *op)
57 {
58 PCHAR event_channel_op_func = xpdd->hypercall_stubs;
59 event_channel_op_func += __HYPERVISOR_event_channel_op * 32;
60 return _hypercall2(event_channel_op_func, (xen_ulong_t)cmd, (xen_ulong_t)op);
61 }
63 static __inline int
64 HYPERVISOR_sched_op(PXENPCI_DEVICE_DATA xpdd, int cmd, void *arg)
65 {
66 PCHAR sched_op_func = xpdd->hypercall_stubs;
67 sched_op_func += __HYPERVISOR_sched_op * 32;
68 return _hypercall2(sched_op_func, (xen_ulong_t)cmd, (xen_ulong_t)arg);
69 }
71 static __inline int
72 HYPERVISOR_shutdown(PXENPCI_DEVICE_DATA xpdd, unsigned int reason)
73 {
74 struct sched_shutdown ss;
75 int retval;
77 KdPrint((__DRIVER_NAME " --> " __FUNCTION__ "\n"));
79 ss.reason = reason;
81 KdPrint((__DRIVER_NAME " A\n"));
83 retval = HYPERVISOR_sched_op(xpdd, SCHEDOP_shutdown, &ss);
85 KdPrint((__DRIVER_NAME " <-- " __FUNCTION__ "\n"));
87 return retval;
88 }