summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/ring_buffer.c
Commit message (Collapse)AuthorAgeFilesLines
* Staging: hv: move hyperv code out of staging directoryGreg Kroah-Hartman2011-10-101-527/+0
| | | | | | | | | | After many years wandering the desert, it is finally time for the Microsoft HyperV code to move out of the staging directory. Or at least the core hyperv bus code, and the utility driver, the rest still have some review to get through by the various subsystem maintainers. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
* Staging: hv: vmbus: Fix a checkpatch warning in ring_buffer.cK. Y. Srinivasan2011-08-291-1/+2
| | | | | | | | 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>
* Staging: hv: vmbus: Cleanup error values in ringbuffer.cK. Y. Srinivasan2011-08-251-3/+3
| | | | | | | | | 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>
* Staging: hv: vmbus: Change the memory barrier in hv_ringbuffer_write()K. Y. Srinivasan2011-06-071-1/+1
| | | | | | | | | | 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>
* Staging: hv: vmbus: Introduce read dependency in hv_get_ringbuffer_availbytes()K. Y. Srinivasan2011-06-071-0/+2
| | | | | | | | | 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>
* Staging: hv: vmbus: Fix the memory barrier in hv_ringbuffer_read()K. Y. Srinivasan2011-06-071-1/+1
| | | | | | | | | 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>
* Staging: hv: vmbus_drv: Move the contents of ring_buffer.h to hyperv_vmbus.hK. Y. Srinivasan2011-05-171-1/+0
| | | | | | | | | | 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>
* Staging: hv: vmbus_drv: Create a common header file to build the vmbus driverK. Y. Srinivasan2011-05-171-0/+1
| | | | | | | | | | 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>
* Staging: hv: Move the contents of logging.h to hyperv.hK. Y. Srinivasan2011-05-171-1/+0
| | | | | | | | | | 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>
* Staging: hv: Include the newly created header file in all of the relevant ↵K. Y. Srinivasan2011-05-171-0/+2
| | | | | | | | | | | | 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>
* Staging: hv: Get rid of the volatile qualifier for a variable in ring_buffer.cK. Y. Srinivasan2011-05-111-1/+1
| | | | | | | | | | | 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>
* Staging: hv: Get rid of the forward declaration of hv_copyto_ringbuffer()K. Y. Srinivasan2011-05-111-39/+27
| | | | | | | | | | 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>
* Staging: hv: Get rid of the forward declaration of hv_copyfrom_ringbufferK. Y. Srinivasan2011-05-111-46/+37
| | | | | | | | | | 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>
* Staging: hv: Cleanup comments in ring_buffer.cK. Y. Srinivasan2011-05-111-194/+129
| | | | | | | | | | 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>
* Staging: hv: Rename all static functions in ring_buffer.cK. Y. Srinivasan2011-05-111-44/+44
| | | | | | | | 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>
* Staging: hv: Rename ringbuffer_get_debuginfoK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | 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>
* Staging: hv: Rename dump_ring_infoK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | 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>
* Staging: hv: Rename get_ringbuffer_interrupt_maskK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | 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>
* Staging: hv: Rename ringbuffer_readK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | 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>
* Staging: hv: Rename ringbuffer_peekK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | 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>
* Staging: hv: Rename ringbuffer_writeK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | | | 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>
* Staging: hv: Rename ringbuffer_cleanupK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | | | 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>
* Staging: hv: Rename the function ringbuffer_initK. Y. Srinivasan2011-05-111-2/+2
| | | | | | | | | | | 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>
* staging: hv: Replace DPRINT with natives in hv_vmbusHank Janssen2011-04-041-0/+1
| | | | | | | | | | | | 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>
* staging: hv: Remove all unneeded DPRINT from hv_vmbusHank Janssen2011-04-041-20/+0
| | | | | | | | | | | | | | 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>
* Staging: hv: Remove osd layerK. Y. Srinivasan2011-02-181-1/+0
| | | | | | | | | | | 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>
* staging: hv: Convert camel cased functions in ring_buffer.c to lower casesHaiyang Zhang2010-11-091-60/+63
| | | | | | | | 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>
* staging: hv: Convert camel cased local variables in ring_buffer.c to lower casesHaiyang Zhang2010-11-091-167/+170
| | | | | | | | 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>
* staging: hv: Convert camel cased struct fields in ring_buffer.h to lower casesHaiyang Zhang2010-11-091-27/+31
| | | | | | | | 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>
* staging: hv: Fixed the value of the 64bit-hole inside ring bufferHaiyang Zhang2010-09-031-2/+1
| | | | | | | | | | | | | | | | | | | | 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>
* Staging: hv: remove RING_BUFFER typedefGreg Kroah-Hartman2010-07-271-3/+3
| | | | | | | | 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>
* Staging: hv: remove RING_BUFFER_INFO typedefGreg Kroah-Hartman2010-07-271-22/+23
| | | | | | | | 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>
* Staging: hv: remove RING_BUFFER_DEBUG_INFO typedefGreg Kroah-Hartman2010-07-271-6/+6
| | | | | | | | 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>
* Staging: hv: remove DPRINT_EXIT macroGreg Kroah-Hartman2010-07-221-6/+0
| | | | | | | | | 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>
* Staging: hv: remove DPRINT_ENTER macroGreg Kroah-Hartman2010-07-221-2/+0
| | | | | | | | | 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>
* Staging: hv: rename RingBuffer.c and .h to ring_buffer.c and .hGreg Kroah-Hartman2010-05-111-0/+627
Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud