diff options
author | Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> | 2009-07-31 02:25:56 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-09-23 08:56:32 -0400 |
commit | 3ca4f5ca73057a617f9444a91022d7127041970a (patch) | |
tree | 382659da29ad0a2e9878df6c7c4204913ab642e7 /include/linux | |
parent | 3a20210dc26bbfff3bbb48bb22d2846240b71d8f (diff) |
virtio: add virtio IDs file
Virtio IDs are spread all over the tree which makes assigning new IDs
bothersome. Putting them together should make the process less error-prone.
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/virtio_9p.h | 2 | ||||
-rw-r--r-- | include/linux/virtio_balloon.h | 3 | ||||
-rw-r--r-- | include/linux/virtio_blk.h | 3 | ||||
-rw-r--r-- | include/linux/virtio_console.h | 3 | ||||
-rw-r--r-- | include/linux/virtio_ids.h | 17 | ||||
-rw-r--r-- | include/linux/virtio_net.h | 3 | ||||
-rw-r--r-- | include/linux/virtio_rng.h | 3 |
7 files changed, 17 insertions, 17 deletions
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 */ |