]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: hv: vmbus_drv: Move the contents of vmbus_private.h to vmbus_hyperv.h
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:34:32 +0000 (19:34 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 19:27:04 +0000 (12:27 -0700)
Move the contents of vmbus_private.h to vmbus_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/channel.c
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/connection.c
drivers/staging/hv/hv.c
drivers/staging/hv/hv_kvp.c
drivers/staging/hv/hv_util.c
drivers/staging/hv/hyperv_vmbus.h
drivers/staging/hv/vmbus_drv.c
drivers/staging/hv/vmbus_private.h [deleted file]

index fb7ace679362b9dcc8524a0b52898f6a73297542..f655e59a9a8fb3c6cba0515dded3c609687166c8 100644 (file)
@@ -29,7 +29,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "vmbus_private.h"
 
 #define NUM_PAGES_SPANNED(addr, len) \
 ((PAGE_ALIGN(addr + len) >> PAGE_SHIFT) - (addr >> PAGE_SHIFT))
index 6433ae1b0e8a22cfe0416e61f8c36e9aea6cc652..e8c706c6c830c288d263d5d9ba82af9251100b5f 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "vmbus_private.h"
 
 struct vmbus_channel_message_table_entry {
        enum vmbus_channel_message_type message_type;
index fda90189962268b7a5cf8fa4fb7e7947f35fae3c..37bbf770ef117714d320a8e18e368b2835263e3b 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "vmbus_private.h"
 
 
 struct vmbus_connection vmbus_connection = {
index 489504b5b89fa162cff0b9e01bb79f88d1560f8b..a2cc0911de58e22b82a1c058497c901a1a19d8a3 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "vmbus_private.h"
 
 /* The one and only */
 struct hv_context hv_context = {
index 35342cbf4288b39c506467c3bb55a605d3a23b08..13b0ecf7d5d61ca9405bec1693a616181c584d00 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/workqueue.h>
 
 #include "hyperv.h"
-#include "vmbus_private.h"
 #include "hv_kvp.h"
 
 
index 981a19a5c627f3f87efd01c0bd61bb4e59ce0509..5605374c346456e5d5581aeddc313f9606d22a1f 100644 (file)
@@ -30,7 +30,6 @@
 #include <linux/pci.h>
 
 #include "hyperv.h"
-#include "vmbus_private.h"
 #include "hv_kvp.h"
 
 static u8 *shut_txf_buf;
index fc3cd2dff2879c1f31157b81a463976f03f83267..ac1a76c3011c1f108391eab61a98b236eebde32d 100644 (file)
@@ -529,4 +529,102 @@ void hv_dump_ring_info(struct hv_ring_buffer_info *ring_info, char *prefix);
 void hv_ringbuffer_get_debuginfo(struct hv_ring_buffer_info *ring_info,
                            struct hv_ring_buffer_debug_info *debug_info);
 
+#include "hyperv.h"
+#include <linux/list.h>
+#include <asm/sync_bitops.h>
+
+
+/*
+ * Maximum channels is determined by the size of the interrupt page
+ * which is PAGE_SIZE. 1/2 of PAGE_SIZE is for send endpoint interrupt
+ * and the other is receive endpoint interrupt
+ */
+#define MAX_NUM_CHANNELS       ((PAGE_SIZE >> 1) << 3) /* 16348 channels */
+
+/* The value here must be in multiple of 32 */
+/* TODO: Need to make this configurable */
+#define MAX_NUM_CHANNELS_SUPPORTED     256
+
+
+enum vmbus_connect_state {
+       DISCONNECTED,
+       CONNECTING,
+       CONNECTED,
+       DISCONNECTING
+};
+
+#define MAX_SIZE_CHANNEL_MESSAGE       HV_MESSAGE_PAYLOAD_BYTE_COUNT
+
+struct vmbus_connection {
+       enum vmbus_connect_state conn_state;
+
+       atomic_t next_gpadl_handle;
+
+       /*
+        * Represents channel interrupts. Each bit position represents a
+        * channel.  When a channel sends an interrupt via VMBUS, it finds its
+        * bit in the sendInterruptPage, set it and calls Hv to generate a port
+        * event. The other end receives the port event and parse the
+        * recvInterruptPage to see which bit is set
+        */
+       void *int_page;
+       void *send_int_page;
+       void *recv_int_page;
+
+       /*
+        * 2 pages - 1st page for parent->child notification and 2nd
+        * is child->parent notification
+        */
+       void *monitor_pages;
+       struct list_head chn_msg_list;
+       spinlock_t channelmsg_lock;
+
+       /* List of channels */
+       struct list_head chn_list;
+       spinlock_t channel_lock;
+
+       struct workqueue_struct *work_queue;
+};
+
+
+struct vmbus_msginfo {
+       /* Bookkeeping stuff */
+       struct list_head msglist_entry;
+
+       /* The message itself */
+       unsigned char msg[0];
+};
+
+
+extern struct vmbus_connection vmbus_connection;
+
+/* General vmbus interface */
+
+struct hv_device *vmbus_child_device_create(struct hv_guid *type,
+                                        struct hv_guid *instance,
+                                        struct vmbus_channel *channel);
+
+int vmbus_child_device_register(struct hv_device *child_device_obj);
+void vmbus_child_device_unregister(struct hv_device *device_obj);
+
+/* static void */
+/* VmbusChildDeviceDestroy( */
+/* struct hv_device *); */
+
+struct vmbus_channel *relid2channel(u32 relid);
+
+
+/* Connection interface */
+
+int vmbus_connect(void);
+
+int vmbus_disconnect(void);
+
+int vmbus_post_msg(void *buffer, size_t buflen);
+
+int vmbus_set_event(u32 child_relid);
+
+void vmbus_on_event(unsigned long data);
+
+
 #endif /* _HYPERV_VMBUS_H */
index 25183cddb48fb116ae507ac8376405e9ecdddc80..e553fc97749530ab452c302568a293e5b125b2cb 100644 (file)
@@ -37,7 +37,6 @@
 
 #include "hyperv.h"
 #include "hyperv_vmbus.h"
-#include "vmbus_private.h"
 
 
 static struct pci_dev *hv_pci_dev;
diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h
deleted file mode 100644 (file)
index 73afe07..0000000
+++ /dev/null
@@ -1,126 +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 _VMBUS_PRIVATE_H_
-#define _VMBUS_PRIVATE_H_
-
-#include "hyperv.h"
-#include <linux/list.h>
-#include <asm/sync_bitops.h>
-
-
-/*
- * Maximum channels is determined by the size of the interrupt page
- * which is PAGE_SIZE. 1/2 of PAGE_SIZE is for send endpoint interrupt
- * and the other is receive endpoint interrupt
- */
-#define MAX_NUM_CHANNELS       ((PAGE_SIZE >> 1) << 3) /* 16348 channels */
-
-/* The value here must be in multiple of 32 */
-/* TODO: Need to make this configurable */
-#define MAX_NUM_CHANNELS_SUPPORTED     256
-
-
-enum vmbus_connect_state {
-       DISCONNECTED,
-       CONNECTING,
-       CONNECTED,
-       DISCONNECTING
-};
-
-#define MAX_SIZE_CHANNEL_MESSAGE       HV_MESSAGE_PAYLOAD_BYTE_COUNT
-
-struct vmbus_connection {
-       enum vmbus_connect_state conn_state;
-
-       atomic_t next_gpadl_handle;
-
-       /*
-        * Represents channel interrupts. Each bit position represents a
-        * channel.  When a channel sends an interrupt via VMBUS, it finds its
-        * bit in the sendInterruptPage, set it and calls Hv to generate a port
-        * event. The other end receives the port event and parse the
-        * recvInterruptPage to see which bit is set
-        */
-       void *int_page;
-       void *send_int_page;
-       void *recv_int_page;
-
-       /*
-        * 2 pages - 1st page for parent->child notification and 2nd
-        * is child->parent notification
-        */
-       void *monitor_pages;
-       struct list_head chn_msg_list;
-       spinlock_t channelmsg_lock;
-
-       /* List of channels */
-       struct list_head chn_list;
-       spinlock_t channel_lock;
-
-       struct workqueue_struct *work_queue;
-};
-
-
-struct vmbus_msginfo {
-       /* Bookkeeping stuff */
-       struct list_head msglist_entry;
-
-       /* The message itself */
-       unsigned char msg[0];
-};
-
-
-extern struct vmbus_connection vmbus_connection;
-
-/* General vmbus interface */
-
-struct hv_device *vmbus_child_device_create(struct hv_guid *type,
-                                        struct hv_guid *instance,
-                                        struct vmbus_channel *channel);
-
-int vmbus_child_device_register(struct hv_device *child_device_obj);
-void vmbus_child_device_unregister(struct hv_device *device_obj);
-
-/* static void */
-/* VmbusChildDeviceDestroy( */
-/* struct hv_device *); */
-
-struct vmbus_channel *relid2channel(u32 relid);
-
-
-/* Connection interface */
-
-int vmbus_connect(void);
-
-int vmbus_disconnect(void);
-
-int vmbus_post_msg(void *buffer, size_t buflen);
-
-int vmbus_set_event(u32 child_relid);
-
-void vmbus_on_event(unsigned long data);
-
-
-#endif /* _VMBUS_PRIVATE_H_ */