aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-07-16 15:34:20 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:01:48 -0400
commit28b6ca9c07787885b89972929f45084eb3197d98 (patch)
treea6b79999e6d0b1151e42efd1d6ff81f8c5a62b6a /drivers
parentb4362c9c1fe8bec487e275f92fdf57c585ac236a (diff)
Staging: hv: osd: remove MemoryFence wrapper
Use the "real" mb call instead of a wrapper function. Cc: Hank Janssen <hjanssen@microsoft.com> Cc: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/hv/RingBuffer.c4
-rw-r--r--drivers/staging/hv/Vmbus.c2
-rw-r--r--drivers/staging/hv/include/osd.h2
-rw-r--r--drivers/staging/hv/osd.c5
4 files changed, 3 insertions, 10 deletions
diff --git a/drivers/staging/hv/RingBuffer.c b/drivers/staging/hv/RingBuffer.c
index 21fc4cc6326..e99546835f2 100644
--- a/drivers/staging/hv/RingBuffer.c
+++ b/drivers/staging/hv/RingBuffer.c
@@ -411,7 +411,7 @@ RingBufferWrite(
411 sizeof(u64)); 411 sizeof(u64));
412 412
413 // Make sure we flush all writes before updating the writeIndex 413 // Make sure we flush all writes before updating the writeIndex
414 MemoryFence(); 414 mb();
415 415
416 // Now, update the write location 416 // Now, update the write location
417 SetNextWriteLocation(OutRingInfo, nextWriteLocation); 417 SetNextWriteLocation(OutRingInfo, nextWriteLocation);
@@ -532,7 +532,7 @@ RingBufferRead(
532 532
533 // Make sure all reads are done before we update the read index since 533 // Make sure all reads are done before we update the read index since
534 // the writer may start writing to the read area once the read index is updated 534 // the writer may start writing to the read area once the read index is updated
535 MemoryFence(); 535 mb();
536 536
537 // Update the read index 537 // Update the read index
538 SetNextReadLocation(InRingInfo, nextReadLocation); 538 SetNextReadLocation(InRingInfo, nextReadLocation);
diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c
index 4ad40be0bdf..72bb08f2439 100644
--- a/drivers/staging/hv/Vmbus.c
+++ b/drivers/staging/hv/Vmbus.c
@@ -426,7 +426,7 @@ VmbusOnMsgDPC(
426 // Make sure the write to MessageType (ie set to HvMessageTypeNone) happens 426 // Make sure the write to MessageType (ie set to HvMessageTypeNone) happens
427 // before we read the MessagePending and EOMing. Otherwise, the EOMing will not deliver 427 // before we read the MessagePending and EOMing. Otherwise, the EOMing will not deliver
428 // any more messages since there is no empty slot 428 // any more messages since there is no empty slot
429 MemoryFence(); 429 mb();
430 430
431 if (msg->Header.MessageFlags.MessagePending) 431 if (msg->Header.MessageFlags.MessagePending)
432 { 432 {
diff --git a/drivers/staging/hv/include/osd.h b/drivers/staging/hv/include/osd.h
index 504d585e713..467196d0044 100644
--- a/drivers/staging/hv/include/osd.h
+++ b/drivers/staging/hv/include/osd.h
@@ -119,8 +119,6 @@ extern void PageFree(void* page, unsigned int count);
119extern void* MemMapIO(unsigned long phys, unsigned long size); 119extern void* MemMapIO(unsigned long phys, unsigned long size);
120extern void MemUnmapIO(void* virt); 120extern void MemUnmapIO(void* virt);
121 121
122extern void MemoryFence(void);
123
124extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context); 122extern HANDLE TimerCreate(PFN_TIMER_CALLBACK pfnTimerCB, void* context);
125extern void TimerClose(HANDLE hTimer); 123extern void TimerClose(HANDLE hTimer);
126extern int TimerStop(HANDLE hTimer); 124extern int TimerStop(HANDLE hTimer);
diff --git a/drivers/staging/hv/osd.c b/drivers/staging/hv/osd.c
index 0c2ad4916cb..7a4c4381fd4 100644
--- a/drivers/staging/hv/osd.c
+++ b/drivers/staging/hv/osd.c
@@ -197,11 +197,6 @@ void MemUnmapIO(void *virt)
197 //iounmap(virt); 197 //iounmap(virt);
198} 198}
199 199
200void MemoryFence()
201{
202 mb();
203}
204
205void TimerCallback(unsigned long data) 200void TimerCallback(unsigned long data)
206{ 201{
207 TIMER* t = (TIMER*)data; 202 TIMER* t = (TIMER*)data;