ia64/xen-unstable

changeset 673:3b0deaef4953

bitkeeper revision 1.388 (3f283b0cfdRYEH7pRqoQr9Mnt8MHmQ)

network.c, dev.c:
Strengthen the memory barriers used for lock-free synchronisation in Xenolinux-Xen network code interface.
author kaf24@scramble.cl.cam.ac.uk
date Wed Jul 30 21:39:24 2003 +0000 (2003-07-30)
parents 48a3323d8b93
children dc4e1de5713d
files xen/net/dev.c xenolinux-2.4.21-sparse/arch/xeno/drivers/network/network.c
line diff
     1.1 --- a/xen/net/dev.c	Wed Jul 30 21:27:29 2003 +0000
     1.2 +++ b/xen/net/dev.c	Wed Jul 30 21:39:24 2003 +0000
     1.3 @@ -840,7 +840,7 @@ static void tx_skb_release(struct sk_buf
     1.4       * Checks below must happen after the above response is posted.
     1.5       * This avoids a possible race with a guest OS on another CPU.
     1.6       */
     1.7 -    smp_rmb();
     1.8 +    smp_mb();
     1.9  
    1.10      if ( (vif->tx_cons == vif->tx_prod) && get_tx_bufs(vif) )
    1.11      {
     2.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/network/network.c	Wed Jul 30 21:27:29 2003 +0000
     2.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/network/network.c	Wed Jul 30 21:39:24 2003 +0000
     2.3 @@ -318,7 +318,7 @@ static int network_start_xmit(struct sk_
     2.4      np->stats.tx_packets++;
     2.5  
     2.6      /* Only notify Xen if there are no outstanding responses. */
     2.7 -    smp_wmb();
     2.8 +    smp_mb();
     2.9      if ( np->net_idx->tx_resp_prod == i )
    2.10          HYPERVISOR_net_update();
    2.11