Skip to content

Commit

Permalink
Staging: hv: Add a subset of definitions from vmbus_api.h to hyperv.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 3f335ea commit a363bf7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
30 changes: 30 additions & 0 deletions drivers/staging/hv/hyperv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
30 changes: 0 additions & 30 deletions drivers/staging/hv/vmbus_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,6 @@
#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;

Expand Down

0 comments on commit a363bf7

Please sign in to comment.