win-pvdrivers

diff xenpci/xenpci_highsync.c @ 537:2a74ac2f43bb

more big updates
dma now working under xp
author James Harper <james.harper@bendigoit.com.au>
date Wed Feb 18 22:18:23 2009 +1100 (2009-02-18)
parents 1d39de3ab8d6
children 5bdb7251370c
line diff
     1.1 --- a/xenpci/xenpci_highsync.c	Sat Feb 14 13:35:48 2009 +1100
     1.2 +++ b/xenpci/xenpci_highsync.c	Wed Feb 18 22:18:23 2009 +1100
     1.3 @@ -19,6 +19,12 @@ Foundation, Inc., 51 Franklin Street, Fi
     1.4  
     1.5  #include "xenpci.h"
     1.6  
     1.7 +/*
     1.8 +we need these intrinsics as even going to HIGH_LEVEL doesn't ensure that interrupts are completely disabled
     1.9 +*/
    1.10 +#pragma intrinsic(_disable)
    1.11 +#pragma intrinsic(_enable)
    1.12 +
    1.13  struct {
    1.14    volatile ULONG        do_spin;
    1.15    volatile LONG         nr_spinning;
    1.16 @@ -47,7 +53,7 @@ XenPci_HighSyncCallFunction0(
    1.17  
    1.18    FUNCTION_ENTER();
    1.19    ActiveProcessorCount = (ULONG)KeNumberProcessors;
    1.20 -  __asm cli;  
    1.21 +  _disable(); //__asm cli;  
    1.22    KeRaiseIrql(highsync_info->sync_level, &old_irql);
    1.23    while (highsync_info->nr_spinning < (LONG)ActiveProcessorCount - 1)
    1.24    {
    1.25 @@ -56,7 +62,7 @@ XenPci_HighSyncCallFunction0(
    1.26    }
    1.27    highsync_info->function0(highsync_info->context);
    1.28    KeLowerIrql(old_irql);
    1.29 -  __asm sti;
    1.30 +  _enable(); //__asm sti;
    1.31    highsync_info->do_spin = FALSE;
    1.32    KeMemoryBarrier();  
    1.33