diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-21 21:20:02 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 01:49:55 -0400 |
commit | 0ca49ca946409f87a8cd0b14d5acb6dea58de6f3 (patch) | |
tree | 5f5927f1b0bf46998f4132d3628ae4c51e5ccf5a /include | |
parent | 0a8a69dd77ddbd4513b21363021ecde7e1025502 (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 'include')
-rw-r--r-- | include/linux/lguest_bus.h | 51 | ||||
-rw-r--r-- | include/linux/lguest_launcher.h | 26 |
2 files changed, 0 insertions, 77 deletions
diff --git a/include/linux/lguest_bus.h b/include/linux/lguest_bus.h deleted file mode 100644 index d27853ddc644..000000000000 --- a/include/linux/lguest_bus.h +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | #ifndef _ASM_LGUEST_DEVICE_H | ||
2 | #define _ASM_LGUEST_DEVICE_H | ||
3 | /* Everything you need to know about lguest devices. */ | ||
4 | #include <linux/device.h> | ||
5 | #include <linux/lguest.h> | ||
6 | #include <linux/lguest_launcher.h> | ||
7 | |||
8 | struct lguest_device { | ||
9 | /* Unique busid, and index into lguest_page->devices[] */ | ||
10 | unsigned int index; | ||
11 | |||
12 | struct device dev; | ||
13 | |||
14 | /* Driver can hang data off here. */ | ||
15 | void *private; | ||
16 | }; | ||
17 | |||
18 | /*D:380 Since interrupt numbers are arbitrary, we use a convention: each device | ||
19 | * can use the interrupt number corresponding to its index. The +1 is because | ||
20 | * interrupt 0 is not usable (it's actually the timer interrupt). */ | ||
21 | static inline int lgdev_irq(const struct lguest_device *dev) | ||
22 | { | ||
23 | return dev->index + 1; | ||
24 | } | ||
25 | /*:*/ | ||
26 | |||
27 | /* dma args must not be vmalloced! */ | ||
28 | void lguest_send_dma(unsigned long key, struct lguest_dma *dma); | ||
29 | int lguest_bind_dma(unsigned long key, struct lguest_dma *dmas, | ||
30 | unsigned int num, u8 irq); | ||
31 | void lguest_unbind_dma(unsigned long key, struct lguest_dma *dmas); | ||
32 | |||
33 | /* Map the virtual device space */ | ||
34 | void *lguest_map(unsigned long phys_addr, unsigned long pages); | ||
35 | void lguest_unmap(void *); | ||
36 | |||
37 | struct lguest_driver { | ||
38 | const char *name; | ||
39 | struct module *owner; | ||
40 | u16 device_type; | ||
41 | int (*probe)(struct lguest_device *dev); | ||
42 | void (*remove)(struct lguest_device *dev); | ||
43 | |||
44 | struct device_driver drv; | ||
45 | }; | ||
46 | |||
47 | extern int register_lguest_driver(struct lguest_driver *drv); | ||
48 | extern void unregister_lguest_driver(struct lguest_driver *drv); | ||
49 | |||
50 | extern struct lguest_device_desc *lguest_devices; /* Just past max_pfn */ | ||
51 | #endif /* _ASM_LGUEST_DEVICE_H */ | ||
diff --git a/include/linux/lguest_launcher.h b/include/linux/lguest_launcher.h index 736e19a510c1..b6603f3fbff8 100644 --- a/include/linux/lguest_launcher.h +++ b/include/linux/lguest_launcher.h | |||
@@ -44,32 +44,6 @@ struct lguest_dma | |||
44 | }; | 44 | }; |
45 | /*:*/ | 45 | /*:*/ |
46 | 46 | ||
47 | /*D:460 This is the layout of a block device memory page. The Launcher sets up | ||
48 | * the num_sectors initially to tell the Guest the size of the disk. The Guest | ||
49 | * puts the type, sector and length of the request in the first three fields, | ||
50 | * then DMAs to the Host. The Host processes the request, sets up the result, | ||
51 | * then DMAs back to the Guest. */ | ||
52 | struct lguest_block_page | ||
53 | { | ||
54 | /* 0 is a read, 1 is a write. */ | ||
55 | int type; | ||
56 | __u32 sector; /* Offset in device = sector * 512. */ | ||
57 | __u32 bytes; /* Length expected to be read/written in bytes */ | ||
58 | /* 0 = pending, 1 = done, 2 = done, error */ | ||
59 | int result; | ||
60 | __u32 num_sectors; /* Disk length = num_sectors * 512 */ | ||
61 | }; | ||
62 | |||
63 | /*D:520 The network device is basically a memory page where all the Guests on | ||
64 | * the network publish their MAC (ethernet) addresses: it's an array of "struct | ||
65 | * lguest_net": */ | ||
66 | struct lguest_net | ||
67 | { | ||
68 | /* Simply the mac address (with multicast bit meaning promisc). */ | ||
69 | unsigned char mac[6]; | ||
70 | }; | ||
71 | /*:*/ | ||
72 | |||
73 | /* Where the Host expects the Guest to SEND_DMA console output to. */ | 47 | /* Where the Host expects the Guest to SEND_DMA console output to. */ |
74 | #define LGUEST_CONSOLE_DMA_KEY 0 | 48 | #define LGUEST_CONSOLE_DMA_KEY 0 |
75 | 49 | ||