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

index 32193119de0c21be9d202ece30b466756da5cd6d..22e434a55362bba48835a9e2702de15b3988972d 100644 (file)
@@ -29,5 +29,35 @@ struct hv_guid {
        unsigned char data[16];
 };
 
+#define MAX_PAGE_BUFFER_COUNT                          16
+#define MAX_MULTIPAGE_BUFFER_COUNT                     32 /* 128K */
+
+#pragma pack(push, 1)
+
+/* Single-page buffer */
+struct hv_page_buffer {
+       u32 len;
+       u32 offset;
+       u64 pfn;
+};
+
+/* Multiple-page buffer */
+struct hv_multipage_buffer {
+       /* Length and Offset determines the # of pfns in the array */
+       u32 len;
+       u32 offset;
+       u64 pfn_array[MAX_MULTIPAGE_BUFFER_COUNT];
+};
+
+/* 0x18 includes the proprietary packet header */
+#define MAX_PAGE_BUFFER_PACKET         (0x18 +                 \
+                                       (sizeof(struct hv_page_buffer) * \
+                                        MAX_PAGE_BUFFER_COUNT))
+#define MAX_MULTIPAGE_BUFFER_PACKET    (0x18 +                 \
+                                        sizeof(struct hv_multipage_buffer))
+
+
+#pragma pack(pop)
+
 
 #endif /* _HYPERV_H */
index 584543694bf647ab582b17c956f25a0d067e11b6..a66ae84d3291aaadb0d55217498bde28c8b01fcd 100644 (file)
 #include <linux/device.h>
 #include <linux/workqueue.h>
 
-#define MAX_PAGE_BUFFER_COUNT                          16
-#define MAX_MULTIPAGE_BUFFER_COUNT                     32 /* 128K */
-
-#pragma pack(push, 1)
-
-/* Single-page buffer */
-struct hv_page_buffer {
-       u32 len;
-       u32 offset;
-       u64 pfn;
-};
-
-/* Multiple-page buffer */
-struct hv_multipage_buffer {
-       /* Length and Offset determines the # of pfns in the array */
-       u32 len;
-       u32 offset;
-       u64 pfn_array[MAX_MULTIPAGE_BUFFER_COUNT];
-};
-
-/* 0x18 includes the proprietary packet header */
-#define MAX_PAGE_BUFFER_PACKET         (0x18 +                 \
-                                       (sizeof(struct hv_page_buffer) * \
-                                        MAX_PAGE_BUFFER_COUNT))
-#define MAX_MULTIPAGE_BUFFER_PACKET    (0x18 +                 \
-                                        sizeof(struct hv_multipage_buffer))
-
-
-#pragma pack(pop)
-
 struct hv_driver;
 struct hv_device;