From 72daf320fb322dc200824e2be17e69553a53fc8a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 5 May 2010 22:45:25 -0700 Subject: Staging: hv: rename VmbusPrivate.h to vmbus_private.h Cc: Hank Janssen Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/VmbusPrivate.h | 134 --------------------------------- drivers/staging/hv/channel.c | 2 +- drivers/staging/hv/channel_interface.c | 2 +- drivers/staging/hv/channel_mgmt.c | 2 +- drivers/staging/hv/connection.c | 2 +- drivers/staging/hv/hv.c | 2 +- drivers/staging/hv/hv_utils.c | 2 +- drivers/staging/hv/vmbus.c | 2 +- drivers/staging/hv/vmbus_private.h | 134 +++++++++++++++++++++++++++++++++ 9 files changed, 141 insertions(+), 141 deletions(-) delete mode 100644 drivers/staging/hv/VmbusPrivate.h create mode 100644 drivers/staging/hv/vmbus_private.h (limited to 'drivers/staging/hv') diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h deleted file mode 100644 index 588c667a7f6..00000000000 --- a/drivers/staging/hv/VmbusPrivate.h +++ /dev/null @@ -1,134 +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 - * Hank Janssen - * - */ - - -#ifndef _VMBUS_PRIVATE_H_ -#define _VMBUS_PRIVATE_H_ - -#include "hv.h" -#include "vmbus_api.h" -#include "channel.h" -#include "channel_mgmt.h" -#include "channel_interface.h" -#include "ring_buffer.h" -#include - - -/* - * 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 ConnectState; - - atomic_t NextGpadlHandle; - - /* - * 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 *InterruptPage; - void *SendInterruptPage; - void *RecvInterruptPage; - - /* - * 2 pages - 1st page for parent->child notification and 2nd - * is child->parent notification - */ - void *MonitorPages; - struct list_head ChannelMsgList; - spinlock_t channelmsg_lock; - - /* List of channels */ - struct list_head ChannelList; - spinlock_t channel_lock; - - struct workqueue_struct *WorkQueue; -}; - - -struct VMBUS_MSGINFO { - /* Bookkeeping stuff */ - struct list_head MsgListEntry; - - /* Synchronize the request/response if needed */ - struct osd_waitevent *WaitEvent; - - /* The message itself */ - unsigned char Msg[0]; -}; - - -extern struct VMBUS_CONNECTION gVmbusConnection; - -/* General vmbus interface */ - -struct hv_device *VmbusChildDeviceCreate(struct hv_guid *deviceType, - struct hv_guid *deviceInstance, - void *context); - -int VmbusChildDeviceAdd(struct hv_device *Device); - -void VmbusChildDeviceRemove(struct hv_device *Device); - -/* static void */ -/* VmbusChildDeviceDestroy( */ -/* struct hv_device *); */ - -struct vmbus_channel *GetChannelFromRelId(u32 relId); - - -/* Connection interface */ - -int VmbusConnect(void); - -int VmbusDisconnect(void); - -int VmbusPostMessage(void *buffer, size_t bufSize); - -int VmbusSetEvent(u32 childRelId); - -void VmbusOnEvents(void); - - -#endif /* _VMBUS_PRIVATE_H_ */ diff --git a/drivers/staging/hv/channel.c b/drivers/staging/hv/channel.c index eab7d16dd5e..12c351e1636 100644 --- a/drivers/staging/hv/channel.c +++ b/drivers/staging/hv/channel.c @@ -24,7 +24,7 @@ #include #include "osd.h" #include "logging.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" /* Internal routines */ static int VmbusChannelCreateGpadlHeader( diff --git a/drivers/staging/hv/channel_interface.c b/drivers/staging/hv/channel_interface.c index 019b064f7cb..d9f51ac75ea 100644 --- a/drivers/staging/hv/channel_interface.c +++ b/drivers/staging/hv/channel_interface.c @@ -23,7 +23,7 @@ #include #include #include "osd.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" static int IVmbusChannelOpen(struct hv_device *device, u32 SendBufferSize, u32 RecvRingBufferSize, void *UserData, diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c index 36982301388..6877e8e7f71 100644 --- a/drivers/staging/hv/channel_mgmt.c +++ b/drivers/staging/hv/channel_mgmt.c @@ -25,7 +25,7 @@ #include #include "osd.h" #include "logging.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" #include "utils.h" struct vmbus_channel_message_table_entry { diff --git a/drivers/staging/hv/connection.c b/drivers/staging/hv/connection.c index 3a01d3ca4ad..e8824dadffc 100644 --- a/drivers/staging/hv/connection.c +++ b/drivers/staging/hv/connection.c @@ -26,7 +26,7 @@ #include #include "osd.h" #include "logging.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" struct VMBUS_CONNECTION gVmbusConnection = { diff --git a/drivers/staging/hv/hv.c b/drivers/staging/hv/hv.c index 2418651772b..6c77e64027f 100644 --- a/drivers/staging/hv/hv.c +++ b/drivers/staging/hv/hv.c @@ -25,7 +25,7 @@ #include #include "osd.h" #include "logging.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" /* The one and only */ struct hv_context gHvContext = { diff --git a/drivers/staging/hv/hv_utils.c b/drivers/staging/hv/hv_utils.c index d6f6dfa0367..5ab1b06c457 100644 --- a/drivers/staging/hv/hv_utils.c +++ b/drivers/staging/hv/hv_utils.c @@ -32,7 +32,7 @@ #include "VmbusChannelInterface.h" #include "VersionInfo.h" #include "channel.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" #include "vmbus_api.h" #include "utils.h" diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c index 90b14beec3a..296c38ff5a4 100644 --- a/drivers/staging/hv/vmbus.c +++ b/drivers/staging/hv/vmbus.c @@ -25,7 +25,7 @@ #include "osd.h" #include "logging.h" #include "VersionInfo.h" -#include "VmbusPrivate.h" +#include "vmbus_private.h" static const char *gDriverName = "vmbus"; diff --git a/drivers/staging/hv/vmbus_private.h b/drivers/staging/hv/vmbus_private.h new file mode 100644 index 00000000000..588c667a7f6 --- /dev/null +++ b/drivers/staging/hv/vmbus_private.h @@ -0,0 +1,134 @@ +/* + * + * 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 + * Hank Janssen + * + */ + + +#ifndef _VMBUS_PRIVATE_H_ +#define _VMBUS_PRIVATE_H_ + +#include "hv.h" +#include "vmbus_api.h" +#include "channel.h" +#include "channel_mgmt.h" +#include "channel_interface.h" +#include "ring_buffer.h" +#include + + +/* + * 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 ConnectState; + + atomic_t NextGpadlHandle; + + /* + * 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 *InterruptPage; + void *SendInterruptPage; + void *RecvInterruptPage; + + /* + * 2 pages - 1st page for parent->child notification and 2nd + * is child->parent notification + */ + void *MonitorPages; + struct list_head ChannelMsgList; + spinlock_t channelmsg_lock; + + /* List of channels */ + struct list_head ChannelList; + spinlock_t channel_lock; + + struct workqueue_struct *WorkQueue; +}; + + +struct VMBUS_MSGINFO { + /* Bookkeeping stuff */ + struct list_head MsgListEntry; + + /* Synchronize the request/response if needed */ + struct osd_waitevent *WaitEvent; + + /* The message itself */ + unsigned char Msg[0]; +}; + + +extern struct VMBUS_CONNECTION gVmbusConnection; + +/* General vmbus interface */ + +struct hv_device *VmbusChildDeviceCreate(struct hv_guid *deviceType, + struct hv_guid *deviceInstance, + void *context); + +int VmbusChildDeviceAdd(struct hv_device *Device); + +void VmbusChildDeviceRemove(struct hv_device *Device); + +/* static void */ +/* VmbusChildDeviceDestroy( */ +/* struct hv_device *); */ + +struct vmbus_channel *GetChannelFromRelId(u32 relId); + + +/* Connection interface */ + +int VmbusConnect(void); + +int VmbusDisconnect(void); + +int VmbusPostMessage(void *buffer, size_t bufSize); + +int VmbusSetEvent(u32 childRelId); + +void VmbusOnEvents(void); + + +#endif /* _VMBUS_PRIVATE_H_ */ -- cgit v1.2.3