Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249660
b: refs/heads/master
c: 89b2ca4
h: refs/heads/master
v: v3
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 1ea8559 commit 6812382
Show file tree
Hide file tree
Showing 10 changed files with 99 additions and 134 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 940655c1032b7ffcb31da1e42a9432f5bcee8653
refs/heads/master: 89b2ca478126040d39a7a5fc39c0b32d2444f9e4
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#include "hyperv.h"
#include "hyperv_vmbus.h"
#include "vmbus_private.h"


struct vmbus_connection vmbus_connection = {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#include "hyperv.h"
#include "hyperv_vmbus.h"
#include "vmbus_private.h"

/* The one and only */
struct hv_context hv_context = {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/hv_kvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <linux/workqueue.h>

#include "hyperv.h"
#include "vmbus_private.h"
#include "hv_kvp.h"


Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/hv_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <linux/pci.h>

#include "hyperv.h"
#include "vmbus_private.h"
#include "hv_kvp.h"

static u8 *shut_txf_buf;
Expand Down
98 changes: 98 additions & 0 deletions trunk/drivers/staging/hv/hyperv_vmbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
1 change: 0 additions & 1 deletion trunk/drivers/staging/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@

#include "hyperv.h"
#include "hyperv_vmbus.h"
#include "vmbus_private.h"


static struct pci_dev *hv_pci_dev;
Expand Down
126 changes: 0 additions & 126 deletions trunk/drivers/staging/hv/vmbus_private.h

This file was deleted.

0 comments on commit 6812382

Please sign in to comment.