ia64/xen-unstable

changeset 9849:1ad06bd6832d

Need a little more serialisation in pciback_do_op().
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Apr 25 18:22:11 2006 +0100 (2006-04-25)
parents e0f2ec5e8358
children ae709b250f43 9df603eff58a
files linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c	Tue Apr 25 18:13:39 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c	Tue Apr 25 18:22:11 2006 +0100
     1.3 @@ -77,12 +77,13 @@ void pciback_do_op(void *data)
     1.4  	clear_bit(_XEN_PCIF_active, (unsigned long *)&pdev->sh_info->flags);
     1.5  	notify_remote_via_irq(pdev->evtchn_irq);
     1.6  
     1.7 -	/* Mark that we're done */
     1.8 -	wmb();
     1.9 +	/* Mark that we're done. */
    1.10 +	smp_mb__before_clear_bit(); /* /after/ clearing PCIF_active */
    1.11  	clear_bit(_PDEVF_op_active, &pdev->flags);
    1.12 +	smp_mb__after_clear_bit(); /* /before/ final check for work */
    1.13  
    1.14 -	/* Check to see if the driver domain tried to start another request
    1.15 -	 * in between clearing _XEN_PCIF_active and clearing _PDEVF_op_active */
    1.16 +	/* Check to see if the driver domain tried to start another request in
    1.17 +	 * between clearing _XEN_PCIF_active and clearing _PDEVF_op_active. */
    1.18  	test_and_schedule_op(pdev);
    1.19  }
    1.20