ibmveth: Use lighter weight read memory barrier in ibmveth_poll
authorAnton Blanchard <anton@samba.org>
Tue, 7 Sep 2010 01:21:41 +0000 (18:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Sep 2010 01:21:41 +0000 (18:21 -0700)
We want to order the read in ibmveth_rxq_pending_buffer and the read of
ibmveth_rxq_buffer_valid which are both cacheable memory. smp_rmb() is good
enough for this.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Santiago Leon <santil@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ibmveth.c

index c236c8af33673482eb5a0a6b814df7bd84274b71..aedcb180218233936d2bd29506776307a690b1f3 100644 (file)
@@ -1010,7 +1010,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget)
                if (!ibmveth_rxq_pending_buffer(adapter))
                        break;
 
-               rmb();
+               smp_rmb();
                if (!ibmveth_rxq_buffer_valid(adapter)) {
                        wmb(); /* suggested by larson1 */
                        adapter->rx_invalid_buffer++;