debuggers.hg

view xenolinux-2.4.21-sparse/include/asm-xeno/multicall.h @ 648:cda951fc1bef

bitkeeper revision 1.341 (3f1120a2WW6KGE81TArq_p654xy38Q)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
author iap10@labyrinth.cl.cam.ac.uk
date Sun Jul 13 09:04:34 2003 +0000 (2003-07-13)
parents b6f13a6cdded 9339f3942f4e
children
line source
1 /******************************************************************************
2 * multicall.h
3 */
5 #ifndef __MULTICALL_H__
6 #define __MULTICALL_H__
8 #include <asm/hypervisor.h>
10 extern multicall_entry_t multicall_list[];
11 extern int nr_multicall_ents;
13 static inline void queue_multicall0(unsigned long op)
14 {
15 int i = nr_multicall_ents;
16 multicall_list[i].op = op;
17 nr_multicall_ents = i+1;
18 }
20 static inline void queue_multicall1(unsigned long op, unsigned long arg1)
21 {
22 int i = nr_multicall_ents;
23 multicall_list[i].op = op;
24 multicall_list[i].args[0] = arg1;
25 nr_multicall_ents = i+1;
26 }
28 static inline void queue_multicall2(
29 unsigned long op, unsigned long arg1, unsigned long arg2)
30 {
31 int i = nr_multicall_ents;
32 multicall_list[i].op = op;
33 multicall_list[i].args[0] = arg1;
34 multicall_list[i].args[1] = arg2;
35 nr_multicall_ents = i+1;
36 }
38 static inline void queue_multicall3(
39 unsigned long op, unsigned long arg1, unsigned long arg2,
40 unsigned long arg3)
41 {
42 int i = nr_multicall_ents;
43 multicall_list[i].op = op;
44 multicall_list[i].args[0] = arg1;
45 multicall_list[i].args[1] = arg2;
46 multicall_list[i].args[2] = arg3;
47 nr_multicall_ents = i+1;
48 }
50 static inline void queue_multicall4(
51 unsigned long op, unsigned long arg1, unsigned long arg2,
52 unsigned long arg3, unsigned long arg4)
53 {
54 int i = nr_multicall_ents;
55 multicall_list[i].op = op;
56 multicall_list[i].args[0] = arg1;
57 multicall_list[i].args[1] = arg2;
58 multicall_list[i].args[2] = arg3;
59 multicall_list[i].args[3] = arg4;
60 nr_multicall_ents = i+1;
61 }
63 static inline void queue_multicall5(
64 unsigned long op, unsigned long arg1, unsigned long arg2,
65 unsigned long arg3, unsigned long arg4, unsigned long arg5)
66 {
67 int i = nr_multicall_ents;
68 multicall_list[i].op = op;
69 multicall_list[i].args[0] = arg1;
70 multicall_list[i].args[1] = arg2;
71 multicall_list[i].args[2] = arg3;
72 multicall_list[i].args[3] = arg4;
73 multicall_list[i].args[4] = arg5;
74 nr_multicall_ents = i+1;
75 }
77 static inline void execute_multicall_list(void)
78 {
79 if ( unlikely(nr_multicall_ents == 0) ) return;
80 (void)HYPERVISOR_multicall(multicall_list, nr_multicall_ents);
81 nr_multicall_ents = 0;
82 }
84 #endif /* __MULTICALL_H__ */