diff options
-rw-r--r-- | arch/x86/lguest/boot.c | 26 | ||||
-rw-r--r-- | include/asm-x86/lguest_hcall.h | 3 |
2 files changed, 13 insertions, 16 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index a55b0902f9d3..e6023b86f31d 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -113,17 +113,6 @@ static void lguest_leave_lazy_mode(void) | |||
113 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); | 113 | hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0); |
114 | } | 114 | } |
115 | 115 | ||
116 | static void lazy_hcall(unsigned long call, | ||
117 | unsigned long arg1, | ||
118 | unsigned long arg2, | ||
119 | unsigned long arg3) | ||
120 | { | ||
121 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) | ||
122 | hcall(call, arg1, arg2, arg3); | ||
123 | else | ||
124 | async_hcall(call, arg1, arg2, arg3); | ||
125 | } | ||
126 | |||
127 | /* async_hcall() is pretty simple: I'm quite proud of it really. We have a | 116 | /* async_hcall() is pretty simple: I'm quite proud of it really. We have a |
128 | * ring buffer of stored hypercalls which the Host will run though next time we | 117 | * ring buffer of stored hypercalls which the Host will run though next time we |
129 | * do a normal hypercall. Each entry in the ring has 4 slots for the hypercall | 118 | * do a normal hypercall. Each entry in the ring has 4 slots for the hypercall |
@@ -134,8 +123,8 @@ static void lazy_hcall(unsigned long call, | |||
134 | * full and we just make the hypercall directly. This has the nice side | 123 | * full and we just make the hypercall directly. This has the nice side |
135 | * effect of causing the Host to run all the stored calls in the ring buffer | 124 | * effect of causing the Host to run all the stored calls in the ring buffer |
136 | * which empties it for next time! */ | 125 | * which empties it for next time! */ |
137 | void async_hcall(unsigned long call, | 126 | static void async_hcall(unsigned long call, unsigned long arg1, |
138 | unsigned long arg1, unsigned long arg2, unsigned long arg3) | 127 | unsigned long arg2, unsigned long arg3) |
139 | { | 128 | { |
140 | /* Note: This code assumes we're uniprocessor. */ | 129 | /* Note: This code assumes we're uniprocessor. */ |
141 | static unsigned int next_call; | 130 | static unsigned int next_call; |
@@ -161,6 +150,17 @@ void async_hcall(unsigned long call, | |||
161 | } | 150 | } |
162 | local_irq_restore(flags); | 151 | local_irq_restore(flags); |
163 | } | 152 | } |
153 | |||
154 | static void lazy_hcall(unsigned long call, | ||
155 | unsigned long arg1, | ||
156 | unsigned long arg2, | ||
157 | unsigned long arg3) | ||
158 | { | ||
159 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_NONE) | ||
160 | hcall(call, arg1, arg2, arg3); | ||
161 | else | ||
162 | async_hcall(call, arg1, arg2, arg3); | ||
163 | } | ||
164 | /*:*/ | 164 | /*:*/ |
165 | 165 | ||
166 | /*G:033 | 166 | /*G:033 |
diff --git a/include/asm-x86/lguest_hcall.h b/include/asm-x86/lguest_hcall.h index 9c5092b6aa9f..2091779e91fb 100644 --- a/include/asm-x86/lguest_hcall.h +++ b/include/asm-x86/lguest_hcall.h | |||
@@ -54,9 +54,6 @@ hcall(unsigned long call, | |||
54 | } | 54 | } |
55 | /*:*/ | 55 | /*:*/ |
56 | 56 | ||
57 | void async_hcall(unsigned long call, | ||
58 | unsigned long arg1, unsigned long arg2, unsigned long arg3); | ||
59 | |||
60 | /* Can't use our min() macro here: needs to be a constant */ | 57 | /* Can't use our min() macro here: needs to be a constant */ |
61 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) | 58 | #define LGUEST_IRQS (NR_IRQS < 32 ? NR_IRQS: 32) |
62 | 59 | ||