Commit Graph

35 Commits

Author SHA1 Message Date
K. Y. Srinivasan b737b2e00d Staging: hv: vmbus: Fix a checkpatch warning in ring_buffer.c
Fix a checkpatch warning in ring_buffer.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-29 11:10:02 -07:00
K. Y. Srinivasan d2598f017f Staging: hv: vmbus: Cleanup error values in ringbuffer.c
Use standard Linux errno values in ringbuffer.c and do the associated
cleanup in the clients.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-25 15:23:18 -07:00
K. Y. Srinivasan e690b5a9be Staging: hv: vmbus: Change the memory barrier in hv_ringbuffer_write()
Use the correct memory barrier interface in Change the memory barrier
in hv_ringbuffer_write().

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: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:45:56 -07:00
K. Y. Srinivasan df2a4a7114 Staging: hv: vmbus: Introduce read dependency in hv_get_ringbuffer_availbytes()
Introduce read dependency in hv_get_ringbuffer_availbytes().

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: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:45:55 -07:00
K. Y. Srinivasan ef0d5b2302 Staging: hv: vmbus: Fix the memory barrier in hv_ringbuffer_read()
Use the correct barrier interface.

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: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-07 13:45:55 -07:00
K. Y. Srinivasan 940655c103 Staging: hv: vmbus_drv: Move the contents of ring_buffer.h to hyperv_vmbus.h
Move the contents of ring_buffer.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>
2011-05-17 12:27:04 -07:00
K. Y. Srinivasan 0f2a6619ee Staging: hv: vmbus_drv: Create a common header file to build the vmbus driver
Create a common header file to build the vmbus driver.

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>
2011-05-17 12:27:03 -07:00
K. Y. Srinivasan f63c9149d0 Staging: hv: Move the contents of logging.h to hyperv.h
Move the contents of logging.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>
2011-05-17 11:46:17 -07:00
K. Y. Srinivasan 3f335ea213 Staging: hv: Include the newly created header file in all of the relevant hyperv files
Include the newly created header file in all of the relevant hyperv files.

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>
2011-05-17 11:46:12 -07:00
K. Y. Srinivasan 66a6054381 Staging: hv: Get rid of the volatile qualifier for a variable in ring_buffer.c
Access to this variable is already serialized via a spin lock. Get
rid of the unnecessary volatile qualifier.

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>
2011-05-11 13:49:10 -07:00
K. Y. Srinivasan 7581578d68 Staging: hv: Get rid of the forward declaration of hv_copyto_ringbuffer()
Get rid of the forward declaration by moving the code around.

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>
2011-05-11 13:49:09 -07:00
K. Y. Srinivasan 8f1136aeb4 Staging: hv: Get rid of the forward declaration of hv_copyfrom_ringbuffer
Get rid of the forward declaration by moving code around.

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>
2011-05-11 13:49:08 -07:00
K. Y. Srinivasan b2a5a58551 Staging: hv: Cleanup comments in ring_buffer.c
Cleanup comments in ring_buffer.c

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>
2011-05-11 13:49:07 -07:00
K. Y. Srinivasan 2b8a912ef2 Staging: hv: Rename all static functions in ring_buffer.c
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>
2011-05-11 13:49:06 -07:00
K. Y. Srinivasan a75b61d528 Staging: hv: Rename ringbuffer_get_debuginfo
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>
2011-05-11 13:49:05 -07:00
K. Y. Srinivasan 549bf93f28 Staging: hv: Rename dump_ring_info
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>
2011-05-11 13:49:05 -07:00
K. Y. Srinivasan decc49dacb Staging: hv: Rename get_ringbuffer_interrupt_mask
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>
2011-05-11 13:49:04 -07:00
K. Y. Srinivasan 38397c8abe Staging: hv: Rename ringbuffer_read
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>
2011-05-11 13:49:04 -07:00
K. Y. Srinivasan a89186c21c Staging: hv: Rename ringbuffer_peek
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>
2011-05-11 13:49:02 -07:00
K. Y. Srinivasan 633c4dce4e Staging: hv: Rename ringbuffer_write
Rename ringbuffer_write.

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>
2011-05-11 13:49:01 -07:00
K. Y. Srinivasan 2dba688ba4 Staging: hv: Rename ringbuffer_cleanup
Rename ringbuffer_cleanup.

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>
2011-05-11 13:49:01 -07:00
K. Y. Srinivasan 72a95cbcbc Staging: hv: Rename the function ringbuffer_init
Rename the function ringbuffer_init to not pollute the
namespace.

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>
2011-05-11 13:49:00 -07:00
Hank Janssen 0a46618d58 staging: hv: Replace DPRINT with natives in hv_vmbus
Replace all remaining DPRINT calls (excluding the ringbuffer debug
which is going to be done in a next set of patches) with their
native pr_ calls. And also changed some of the printouts to be more
useful.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:03:07 -07:00
Hank Janssen 98e087022b staging: hv: Remove all unneeded DPRINT from hv_vmbus
Remove all un-needed DPRINT calls from hv_vmbus. Several
are remaining that will be cleaned up in my next set of patches.
They deal with printing out the ringbuffer debugging which is
going to be implemented slightly differently.

This patch deals with hv_vmbus only.

Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-04 22:03:05 -07:00
K. Y. Srinivasan e3fe0bb65b Staging: hv: Remove osd layer
The OSD layer was a wrapper around native interfaces
adding little value and was infact buggy -
refer to the osd_wait.patch for details.
This patch gets rid of the OSD abstraction.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:11:03 -08:00
Haiyang Zhang 1ac586445d staging: hv: Convert camel cased functions in ring_buffer.c to lower cases
staging: hv: Convert camel cased functions in ring_buffer.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:42:12 -08:00
Haiyang Zhang fc8c72ebfa staging: hv: Convert camel cased local variables in ring_buffer.c to lower cases
staging: hv: Convert camel cased local variables in ring_buffer.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:42:12 -08:00
Haiyang Zhang 82f8bd40a0 staging: hv: Convert camel cased struct fields in ring_buffer.h to lower cases
staging: hv: Convert camel cased struct fields in ring_buffer.h to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:42:12 -08:00
Haiyang Zhang e5fa721d1c staging: hv: Fixed the value of the 64bit-hole inside ring buffer
Fixed the value of the 64bit-hole inside ring buffer, this
caused a problem on Hyper-V when running checked Windows builds.

Checked builds of Windows are used internally and given to external
system integrators at times. They are builds that for example that all
elements in a structure follow the definition of that Structure. The bug
this fixed was for a field that we did not fill in at all (Because we do
Not use it on the Linux side), and the checked build of windows gives
errors on it internally to the Windows logs.

This fixes that error.

Signed-off-by:Hank Janssen <hjanssen@microsoft.com>
Signed-off-by:Haiyang Zhang <haiyangz@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-03 17:37:15 -07:00
Greg Kroah-Hartman 4a1b3acc90 Staging: hv: remove RING_BUFFER typedef
typedefs are bad, kill them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-27 11:47:08 -07:00
Greg Kroah-Hartman 8a0e1c5505 Staging: hv: remove RING_BUFFER_INFO typedef
typedefs are bad, kill them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-27 11:43:11 -07:00
Greg Kroah-Hartman 80682b7a48 Staging: hv: remove RING_BUFFER_DEBUG_INFO typedef
typedefs are bad, kill them.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-27 11:37:32 -07:00
Greg Kroah-Hartman 83c720ea39 Staging: hv: remove DPRINT_EXIT macro
No need for it, use the built-in kernel function tracing instead
if you really need something like this.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 15:14:04 -07:00
Greg Kroah-Hartman 2acadc269f Staging: hv: remove DPRINT_ENTER macro
We have ftrace to look at function traces if its really
needed.  Don't roll custom macros for this.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 15:00:18 -07:00
Greg Kroah-Hartman 8f078ca6e7 Staging: hv: rename RingBuffer.c and .h to ring_buffer.c and .h
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:16 -07:00