aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/lguest/lguest.c1
-rw-r--r--drivers/block/virtio_blk.c1
-rw-r--r--drivers/char/hw_random/virtio-rng.c1
-rw-r--r--drivers/char/virtio_console.c1
-rw-r--r--drivers/net/virtio_net.c1
-rw-r--r--drivers/virtio/virtio_balloon.c1
-rw-r--r--include/linux/virtio_9p.h2
-rw-r--r--include/linux/virtio_balloon.h3
-rw-r--r--include/linux/virtio_blk.h3
-rw-r--r--include/linux/virtio_console.h3
-rw-r--r--include/linux/virtio_ids.h17
-rw-r--r--include/linux/virtio_net.h3
-rw-r--r--include/linux/virtio_rng.h3
-rw-r--r--net/9p/trans_virtio.c1
14 files changed, 24 insertions, 17 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
index 950cde6d6e58..84bbb190bf7b 100644
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -42,6 +42,7 @@
42#include <signal.h> 42#include <signal.h>
43#include "linux/lguest_launcher.h" 43#include "linux/lguest_launcher.h"
44#include "linux/virtio_config.h" 44#include "linux/virtio_config.h"
45#include <linux/virtio_ids.h>
45#include "linux/virtio_net.h" 46#include "linux/virtio_net.h"
46#include "linux/virtio_blk.h" 47#include "linux/virtio_blk.h"
47#include "linux/virtio_console.h" 48#include "linux/virtio_console.h"
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index d739ee4201f9..73de7532fcf5 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -3,6 +3,7 @@
3#include <linux/blkdev.h> 3#include <linux/blkdev.h>
4#include <linux/hdreg.h> 4#include <linux/hdreg.h>
5#include <linux/virtio.h> 5#include <linux/virtio.h>
6#include <linux/virtio_ids.h>
6#include <linux/virtio_blk.h> 7#include <linux/virtio_blk.h>
7#include <linux/scatterlist.h> 8#include <linux/scatterlist.h>
8 9
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index b6c24dcc987d..962968f05b94 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -21,6 +21,7 @@
21#include <linux/scatterlist.h> 21#include <linux/scatterlist.h>
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23#include <linux/virtio.h> 23#include <linux/virtio.h>
24#include <linux/virtio_ids.h>
24#include <linux/virtio_rng.h> 25#include <linux/virtio_rng.h>
25 26
26/* The host will fill any buffer we give it with sweet, sweet randomness. We 27/* The host will fill any buffer we give it with sweet, sweet randomness. We
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index a035ae39a359..0d328b59568d 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -31,6 +31,7 @@
31#include <linux/err.h> 31#include <linux/err.h>
32#include <linux/init.h> 32#include <linux/init.h>
33#include <linux/virtio.h> 33#include <linux/virtio.h>
34#include <linux/virtio_ids.h>
34#include <linux/virtio_console.h> 35#include <linux/virtio_console.h>
35#include "hvc_console.h" 36#include "hvc_console.h"
36 37
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fbf04a553f5a..5c498d2b043f 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -22,6 +22,7 @@
22#include <linux/ethtool.h> 22#include <linux/ethtool.h>
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/virtio.h> 24#include <linux/virtio.h>
25#include <linux/virtio_ids.h>
25#include <linux/virtio_net.h> 26#include <linux/virtio_net.h>
26#include <linux/scatterlist.h> 27#include <linux/scatterlist.h>
27#include <linux/if_vlan.h> 28#include <linux/if_vlan.h>
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c
index 39789232646d..200c22f55130 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -19,6 +19,7 @@
19 */ 19 */
20//#define DEBUG 20//#define DEBUG
21#include <linux/virtio.h> 21#include <linux/virtio.h>
22#include <linux/virtio_ids.h>
22#include <linux/virtio_balloon.h> 23#include <linux/virtio_balloon.h>
23#include <linux/swap.h> 24#include <linux/swap.h>
24#include <linux/kthread.h> 25#include <linux/kthread.h>
diff --git a/include/linux/virtio_9p.h b/include/linux/virtio_9p.h
index b3c4a60ceeb3..ea7226a45acb 100644
--- a/include/linux/virtio_9p.h
+++ b/include/linux/virtio_9p.h
@@ -4,8 +4,6 @@
4 * compatible drivers/servers. */ 4 * compatible drivers/servers. */
5#include <linux/virtio_config.h> 5#include <linux/virtio_config.h>
6 6
7/* The ID for virtio console */
8#define VIRTIO_ID_9P 9
9/* Maximum number of virtio channels per partition (1 for now) */ 7/* Maximum number of virtio channels per partition (1 for now) */
10#define MAX_9P_CHAN 1 8#define MAX_9P_CHAN 1
11 9
diff --git a/include/linux/virtio_balloon.h b/include/linux/virtio_balloon.h
index 8726ff77763e..09d730085060 100644
--- a/include/linux/virtio_balloon.h
+++ b/include/linux/virtio_balloon.h
@@ -4,9 +4,6 @@
4 * compatible drivers/servers. */ 4 * compatible drivers/servers. */
5#include <linux/virtio_config.h> 5#include <linux/virtio_config.h>
6 6
7/* The ID for virtio_balloon */
8#define VIRTIO_ID_BALLOON 5
9
10/* The feature bitmap for virtio balloon */ 7/* The feature bitmap for virtio balloon */
11#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */ 8#define VIRTIO_BALLOON_F_MUST_TELL_HOST 0 /* Tell before reclaiming pages */
12 9
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h
index 8dab9f2b8832..25fbabfa90d4 100644
--- a/include/linux/virtio_blk.h
+++ b/include/linux/virtio_blk.h
@@ -5,9 +5,6 @@
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/virtio_config.h> 6#include <linux/virtio_config.h>
7 7
8/* The ID for virtio_block */
9#define VIRTIO_ID_BLOCK 2
10
11/* Feature bits */ 8/* Feature bits */
12#define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */ 9#define VIRTIO_BLK_F_BARRIER 0 /* Does host support barriers? */
13#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */ 10#define VIRTIO_BLK_F_SIZE_MAX 1 /* Indicates maximum segment size */
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h
index dc161115ae35..b5f519806014 100644
--- a/include/linux/virtio_console.h
+++ b/include/linux/virtio_console.h
@@ -5,9 +5,6 @@
5/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so 5/* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
6 * anyone can use the definitions to implement compatible drivers/servers. */ 6 * anyone can use the definitions to implement compatible drivers/servers. */
7 7
8/* The ID for virtio console */
9#define VIRTIO_ID_CONSOLE 3
10
11/* Feature bits */ 8/* Feature bits */
12#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */ 9#define VIRTIO_CONSOLE_F_SIZE 0 /* Does host provide console size? */
13 10
diff --git a/include/linux/virtio_ids.h b/include/linux/virtio_ids.h
new file mode 100644
index 000000000000..06660c0a78d7
--- /dev/null
+++ b/include/linux/virtio_ids.h
@@ -0,0 +1,17 @@
1#ifndef _LINUX_VIRTIO_IDS_H
2#define _LINUX_VIRTIO_IDS_H
3/*
4 * Virtio IDs
5 *
6 * This header is BSD licensed so anyone can use the definitions to implement
7 * compatible drivers/servers.
8 */
9
10#define VIRTIO_ID_NET 1 /* virtio net */
11#define VIRTIO_ID_BLOCK 2 /* virtio block */
12#define VIRTIO_ID_CONSOLE 3 /* virtio console */
13#define VIRTIO_ID_RNG 4 /* virtio ring */
14#define VIRTIO_ID_BALLOON 5 /* virtio balloon */
15#define VIRTIO_ID_9P 9 /* 9p virtio console */
16
17#endif /* _LINUX_VIRTIO_IDS_H */
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h
index d8dd539c9f48..1f41734bbb77 100644
--- a/include/linux/virtio_net.h
+++ b/include/linux/virtio_net.h
@@ -6,9 +6,6 @@
6#include <linux/virtio_config.h> 6#include <linux/virtio_config.h>
7#include <linux/if_ether.h> 7#include <linux/if_ether.h>
8 8
9/* The ID for virtio_net */
10#define VIRTIO_ID_NET 1
11
12/* The feature bitmap for virtio net */ 9/* The feature bitmap for virtio net */
13#define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */ 10#define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */
14#define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */ 11#define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */
diff --git a/include/linux/virtio_rng.h b/include/linux/virtio_rng.h
index 1a85dab8a940..48121c3c434b 100644
--- a/include/linux/virtio_rng.h
+++ b/include/linux/virtio_rng.h
@@ -4,7 +4,4 @@
4 * compatible drivers/servers. */ 4 * compatible drivers/servers. */
5#include <linux/virtio_config.h> 5#include <linux/virtio_config.h>
6 6
7/* The ID for virtio_rng */
8#define VIRTIO_ID_RNG 4
9
10#endif /* _LINUX_VIRTIO_RNG_H */ 7#endif /* _LINUX_VIRTIO_RNG_H */
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index ea1e3daabefe..b2e07f0dd298 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -43,6 +43,7 @@
43#include <net/9p/transport.h> 43#include <net/9p/transport.h>
44#include <linux/scatterlist.h> 44#include <linux/scatterlist.h>
45#include <linux/virtio.h> 45#include <linux/virtio.h>
46#include <linux/virtio_ids.h>
46#include <linux/virtio_9p.h> 47#include <linux/virtio_9p.h>
47 48
48#define VIRTQUEUE_NUM 128 49#define VIRTQUEUE_NUM 128