diff options
Diffstat (limited to 'arch/x86/lguest/boot.c')
-rw-r--r-- | arch/x86/lguest/boot.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 090f30cbf24c..959aeebb02f5 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #include <linux/clockchips.h> | 55 | #include <linux/clockchips.h> |
56 | #include <linux/lguest.h> | 56 | #include <linux/lguest.h> |
57 | #include <linux/lguest_launcher.h> | 57 | #include <linux/lguest_launcher.h> |
58 | #include <linux/lguest_bus.h> | ||
59 | #include <asm/paravirt.h> | 58 | #include <asm/paravirt.h> |
60 | #include <asm/param.h> | 59 | #include <asm/param.h> |
61 | #include <asm/page.h> | 60 | #include <asm/page.h> |
@@ -162,46 +161,6 @@ void async_hcall(unsigned long call, | |||
162 | } | 161 | } |
163 | /*:*/ | 162 | /*:*/ |
164 | 163 | ||
165 | /* Wrappers for the SEND_DMA and BIND_DMA hypercalls. This is mainly because | ||
166 | * Jeff Garzik complained that __pa() should never appear in drivers, and this | ||
167 | * helps remove most of them. But also, it wraps some ugliness. */ | ||
168 | void lguest_send_dma(unsigned long key, struct lguest_dma *dma) | ||
169 | { | ||
170 | /* The hcall might not write this if something goes wrong */ | ||
171 | dma->used_len = 0; | ||
172 | hcall(LHCALL_SEND_DMA, key, __pa(dma), 0); | ||
173 | } | ||
174 | |||
175 | int lguest_bind_dma(unsigned long key, struct lguest_dma *dmas, | ||
176 | unsigned int num, u8 irq) | ||
177 | { | ||
178 | /* This is the only hypercall which actually wants 5 arguments, and we | ||
179 | * only support 4. Fortunately the interrupt number is always less | ||
180 | * than 256, so we can pack it with the number of dmas in the final | ||
181 | * argument. */ | ||
182 | if (!hcall(LHCALL_BIND_DMA, key, __pa(dmas), (num << 8) | irq)) | ||
183 | return -ENOMEM; | ||
184 | return 0; | ||
185 | } | ||
186 | |||
187 | /* Unbinding is the same hypercall as binding, but with 0 num & irq. */ | ||
188 | void lguest_unbind_dma(unsigned long key, struct lguest_dma *dmas) | ||
189 | { | ||
190 | hcall(LHCALL_BIND_DMA, key, __pa(dmas), 0); | ||
191 | } | ||
192 | |||
193 | /* For guests, device memory can be used as normal memory, so we cast away the | ||
194 | * __iomem to quieten sparse. */ | ||
195 | void *lguest_map(unsigned long phys_addr, unsigned long pages) | ||
196 | { | ||
197 | return (__force void *)ioremap(phys_addr, PAGE_SIZE*pages); | ||
198 | } | ||
199 | |||
200 | void lguest_unmap(void *addr) | ||
201 | { | ||
202 | iounmap((__force void __iomem *)addr); | ||
203 | } | ||
204 | |||
205 | /*G:033 | 164 | /*G:033 |
206 | * Here are our first native-instruction replacements: four functions for | 165 | * Here are our first native-instruction replacements: four functions for |
207 | * interrupt control. | 166 | * interrupt control. |