aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lguest
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-10-21 21:20:02 -0400
committerRusty Russell <rusty@rustcorp.com.au>2007-10-23 01:49:55 -0400
commit0ca49ca946409f87a8cd0b14d5acb6dea58de6f3 (patch)
tree5f5927f1b0bf46998f4132d3628ae4c51e5ccf5a /arch/x86/lguest
parent0a8a69dd77ddbd4513b21363021ecde7e1025502 (diff)
Remove old lguest bus and drivers.
This gets rid of the lguest bus, drivers and DMA mechanism, to make way for a generic virtio mechanism. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/lguest')
-rw-r--r--arch/x86/lguest/boot.c41
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. */
168void 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
175int 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. */
188void 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. */
195void *lguest_map(unsigned long phys_addr, unsigned long pages)
196{
197 return (__force void *)ioremap(phys_addr, PAGE_SIZE*pages);
198}
199
200void 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.