Staging: hv: Move a subset of definitions from ring_buffer.h to hyperv.h
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:34:17 +0000 (19:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 18:46:13 +0000 (11:46 -0700)
Move a subset of definitions from ring_buffer.h to hyperv.h.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/hyperv.h
drivers/staging/hv/ring_buffer.h

index 22e434a55362bba48835a9e2702de15b3988972d..0baa868e4d32448e03651b6d2556e012e337a4c7 100644 (file)
@@ -59,5 +59,46 @@ struct hv_multipage_buffer {
 
 #pragma pack(pop)
 
+struct hv_ring_buffer {
+       /* Offset in bytes from the start of ring data below */
+       u32 write_index;
+
+       /* Offset in bytes from the start of ring data below */
+       u32 read_index;
+
+       u32 interrupt_mask;
+
+       /* Pad it to PAGE_SIZE so that data starts on page boundary */
+       u8      reserved[4084];
+
+       /* NOTE:
+        * The interrupt_mask field is used only for channels but since our
+        * vmbus connection also uses this data structure and its data starts
+        * here, we commented out this field.
+        */
+
+       /*
+        * Ring data starts here + RingDataStartOffset
+        * !!! DO NOT place any fields below this !!!
+        */
+       u8 buffer[0];
+} __packed;
+
+struct hv_ring_buffer_info {
+       struct hv_ring_buffer *ring_buffer;
+       u32 ring_size;                  /* Include the shared header */
+       spinlock_t ring_lock;
+
+       u32 ring_datasize;              /* < ring_size */
+       u32 ring_data_startoffset;
+};
+
+struct hv_ring_buffer_debug_info {
+       u32 current_interrupt_mask;
+       u32 current_read_index;
+       u32 current_write_index;
+       u32 bytes_avail_toread;
+       u32 bytes_avail_towrite;
+};
 
 #endif /* _HYPERV_H */
index 089c536133c6c0a98a3bd4fa3355cf8343a36532..72d166f1d97af91872acbba9ef71652baa295bb0 100644 (file)
 
 #include <linux/scatterlist.h>
 
-struct hv_ring_buffer {
-       /* Offset in bytes from the start of ring data below */
-       u32 write_index;
-
-       /* Offset in bytes from the start of ring data below */
-       u32 read_index;
-
-       u32 interrupt_mask;
-
-       /* Pad it to PAGE_SIZE so that data starts on page boundary */
-       u8      reserved[4084];
-
-       /* NOTE:
-        * The interrupt_mask field is used only for channels but since our
-        * vmbus connection also uses this data structure and its data starts
-        * here, we commented out this field.
-        */
-
-       /*
-        * Ring data starts here + RingDataStartOffset
-        * !!! DO NOT place any fields below this !!!
-        */
-       u8 buffer[0];
-} __packed;
-
-struct hv_ring_buffer_info {
-       struct hv_ring_buffer *ring_buffer;
-       u32 ring_size;                  /* Include the shared header */
-       spinlock_t ring_lock;
-
-       u32 ring_datasize;              /* < ring_size */
-       u32 ring_data_startoffset;
-};
-
-struct hv_ring_buffer_debug_info {
-       u32 current_interrupt_mask;
-       u32 current_read_index;
-       u32 current_write_index;
-       u32 bytes_avail_toread;
-       u32 bytes_avail_towrite;
-};
-
-
 
 /* Interface */