]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Staging: hv: vmbus_drv: Move the content of hv.h to hyperv_vmbus.h
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:34:30 +0000 (19:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 19:27:04 +0000 (12:27 -0700)
Move the content of hv.h to hyperv_vmbus.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/hv.h [deleted file]
drivers/staging/hv/hyperv_vmbus.h
drivers/staging/hv/vmbus_private.h

diff --git a/drivers/staging/hv/hv.h b/drivers/staging/hv/hv.h
deleted file mode 100644 (file)
index 9b50dc6..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- *
- * Copyright (c) 2009, Microsoft Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- * Authors:
- *   Haiyang Zhang <haiyangz@microsoft.com>
- *   Hank Janssen  <hjanssen@microsoft.com>
- *
- */
-
-
-#ifndef __HV_H__
-#define __HV_H__
-
-#include "hyperv_vmbus.h"
-
-enum {
-       VMBUS_MESSAGE_CONNECTION_ID     = 1,
-       VMBUS_MESSAGE_PORT_ID           = 1,
-       VMBUS_EVENT_CONNECTION_ID       = 2,
-       VMBUS_EVENT_PORT_ID             = 2,
-       VMBUS_MONITOR_CONNECTION_ID     = 3,
-       VMBUS_MONITOR_PORT_ID           = 3,
-       VMBUS_MESSAGE_SINT              = 2,
-};
-
-/* #defines */
-
-#define HV_PRESENT_BIT                 0x80000000
-
-#define HV_LINUX_GUEST_ID_LO           0x00000000
-#define HV_LINUX_GUEST_ID_HI           0xB16B00B5
-#define HV_LINUX_GUEST_ID              (((u64)HV_LINUX_GUEST_ID_HI << 32) | \
-                                          HV_LINUX_GUEST_ID_LO)
-
-#define HV_CPU_POWER_MANAGEMENT                (1 << 0)
-#define HV_RECOMMENDATIONS_MAX         4
-
-#define HV_X64_MAX                     5
-#define HV_CAPS_MAX                    8
-
-
-#define HV_HYPERCALL_PARAM_ALIGN       sizeof(u64)
-
-
-/* Service definitions */
-
-#define HV_SERVICE_PARENT_PORT                         (0)
-#define HV_SERVICE_PARENT_CONNECTION                   (0)
-
-#define HV_SERVICE_CONNECT_RESPONSE_SUCCESS            (0)
-#define HV_SERVICE_CONNECT_RESPONSE_INVALID_PARAMETER  (1)
-#define HV_SERVICE_CONNECT_RESPONSE_UNKNOWN_SERVICE    (2)
-#define HV_SERVICE_CONNECT_RESPONSE_CONNECTION_REJECTED        (3)
-
-#define HV_SERVICE_CONNECT_REQUEST_MESSAGE_ID          (1)
-#define HV_SERVICE_CONNECT_RESPONSE_MESSAGE_ID         (2)
-#define HV_SERVICE_DISCONNECT_REQUEST_MESSAGE_ID       (3)
-#define HV_SERVICE_DISCONNECT_RESPONSE_MESSAGE_ID      (4)
-#define HV_SERVICE_MAX_MESSAGE_ID                              (4)
-
-#define HV_SERVICE_PROTOCOL_VERSION (0x0010)
-#define HV_CONNECT_PAYLOAD_BYTE_COUNT 64
-
-/* #define VMBUS_REVISION_NUMBER       6 */
-
-/* Our local vmbus's port and connection id. Anything >0 is fine */
-/* #define VMBUS_PORT_ID               11 */
-
-/* 628180B8-308D-4c5e-B7DB-1BEB62E62EF4 */
-static const struct hv_guid VMBUS_SERVICE_ID = {
-       .data = {
-               0xb8, 0x80, 0x81, 0x62, 0x8d, 0x30, 0x5e, 0x4c,
-               0xb7, 0xdb, 0x1b, 0xeb, 0x62, 0xe6, 0x2e, 0xf4
-       },
-};
-
-#define MAX_NUM_CPUS   32
-
-
-struct hv_input_signal_event_buffer {
-       u64 align8;
-       struct hv_input_signal_event event;
-};
-
-struct hv_context {
-       /* We only support running on top of Hyper-V
-       * So at this point this really can only contain the Hyper-V ID
-       */
-       u64 guestid;
-
-       void *hypercall_page;
-
-       bool synic_initialized;
-
-       /*
-        * This is used as an input param to HvCallSignalEvent hypercall. The
-        * input param is immutable in our usage and must be dynamic mem (vs
-        * stack or global). */
-       struct hv_input_signal_event_buffer *signal_event_buffer;
-       /* 8-bytes aligned of the buffer above */
-       struct hv_input_signal_event *signal_event_param;
-
-       void *synic_message_page[MAX_NUM_CPUS];
-       void *synic_event_page[MAX_NUM_CPUS];
-};
-
-extern struct hv_context hv_context;
-
-
-/* Hv Interface */
-
-extern int hv_init(void);
-
-extern void hv_cleanup(void);
-
-extern u16 hv_post_message(union hv_connection_id connection_id,
-                        enum hv_message_type message_type,
-                        void *payload, size_t payload_size);
-
-extern u16 hv_signal_event(void);
-
-extern void hv_synic_init(void *irqarg);
-
-extern void hv_synic_cleanup(void *arg);
-
-#endif /* __HV_H__ */
index 359d7c9ae81f8eb696181ff784882a8d05761c6c..897961fe9bbc024500ff714adc0c34f3cc20419f 100644 (file)
@@ -390,4 +390,115 @@ union hv_x64_msr_hypercall_contents {
        };
 };
 
+
+enum {
+       VMBUS_MESSAGE_CONNECTION_ID     = 1,
+       VMBUS_MESSAGE_PORT_ID           = 1,
+       VMBUS_EVENT_CONNECTION_ID       = 2,
+       VMBUS_EVENT_PORT_ID             = 2,
+       VMBUS_MONITOR_CONNECTION_ID     = 3,
+       VMBUS_MONITOR_PORT_ID           = 3,
+       VMBUS_MESSAGE_SINT              = 2,
+};
+
+/* #defines */
+
+#define HV_PRESENT_BIT                 0x80000000
+
+#define HV_LINUX_GUEST_ID_LO           0x00000000
+#define HV_LINUX_GUEST_ID_HI           0xB16B00B5
+#define HV_LINUX_GUEST_ID              (((u64)HV_LINUX_GUEST_ID_HI << 32) | \
+                                          HV_LINUX_GUEST_ID_LO)
+
+#define HV_CPU_POWER_MANAGEMENT                (1 << 0)
+#define HV_RECOMMENDATIONS_MAX         4
+
+#define HV_X64_MAX                     5
+#define HV_CAPS_MAX                    8
+
+
+#define HV_HYPERCALL_PARAM_ALIGN       sizeof(u64)
+
+
+/* Service definitions */
+
+#define HV_SERVICE_PARENT_PORT                         (0)
+#define HV_SERVICE_PARENT_CONNECTION                   (0)
+
+#define HV_SERVICE_CONNECT_RESPONSE_SUCCESS            (0)
+#define HV_SERVICE_CONNECT_RESPONSE_INVALID_PARAMETER  (1)
+#define HV_SERVICE_CONNECT_RESPONSE_UNKNOWN_SERVICE    (2)
+#define HV_SERVICE_CONNECT_RESPONSE_CONNECTION_REJECTED        (3)
+
+#define HV_SERVICE_CONNECT_REQUEST_MESSAGE_ID          (1)
+#define HV_SERVICE_CONNECT_RESPONSE_MESSAGE_ID         (2)
+#define HV_SERVICE_DISCONNECT_REQUEST_MESSAGE_ID       (3)
+#define HV_SERVICE_DISCONNECT_RESPONSE_MESSAGE_ID      (4)
+#define HV_SERVICE_MAX_MESSAGE_ID                              (4)
+
+#define HV_SERVICE_PROTOCOL_VERSION (0x0010)
+#define HV_CONNECT_PAYLOAD_BYTE_COUNT 64
+
+/* #define VMBUS_REVISION_NUMBER       6 */
+
+/* Our local vmbus's port and connection id. Anything >0 is fine */
+/* #define VMBUS_PORT_ID               11 */
+
+/* 628180B8-308D-4c5e-B7DB-1BEB62E62EF4 */
+static const struct hv_guid VMBUS_SERVICE_ID = {
+       .data = {
+               0xb8, 0x80, 0x81, 0x62, 0x8d, 0x30, 0x5e, 0x4c,
+               0xb7, 0xdb, 0x1b, 0xeb, 0x62, 0xe6, 0x2e, 0xf4
+       },
+};
+
+#define MAX_NUM_CPUS   32
+
+
+struct hv_input_signal_event_buffer {
+       u64 align8;
+       struct hv_input_signal_event event;
+};
+
+struct hv_context {
+       /* We only support running on top of Hyper-V
+       * So at this point this really can only contain the Hyper-V ID
+       */
+       u64 guestid;
+
+       void *hypercall_page;
+
+       bool synic_initialized;
+
+       /*
+        * This is used as an input param to HvCallSignalEvent hypercall. The
+        * input param is immutable in our usage and must be dynamic mem (vs
+        * stack or global). */
+       struct hv_input_signal_event_buffer *signal_event_buffer;
+       /* 8-bytes aligned of the buffer above */
+       struct hv_input_signal_event *signal_event_param;
+
+       void *synic_message_page[MAX_NUM_CPUS];
+       void *synic_event_page[MAX_NUM_CPUS];
+};
+
+extern struct hv_context hv_context;
+
+
+/* Hv Interface */
+
+extern int hv_init(void);
+
+extern void hv_cleanup(void);
+
+extern u16 hv_post_message(union hv_connection_id connection_id,
+                        enum hv_message_type message_type,
+                        void *payload, size_t payload_size);
+
+extern u16 hv_signal_event(void);
+
+extern void hv_synic_init(void *irqarg);
+
+extern void hv_synic_cleanup(void *arg);
+
 #endif /* _HYPERV_VMBUS_H */
index f62caf90f5624a7123a76ff87c019ef68418074b..3985096be04406fde72d7c507658c945265bb29c 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef _VMBUS_PRIVATE_H_
 #define _VMBUS_PRIVATE_H_
 
-#include "hv.h"
 #include "hyperv.h"
 #include "ring_buffer.h"
 #include <linux/list.h>