win-pvdrivers

changeset 387:48df739c66d4

Removed some debugging calls to the HLT instruction
author James Harper <james.harper@bendigoit.com.au>
date Fri Jul 11 14:05:34 2008 +1000 (2008-07-11)
parents 193ef493dfcb
children 81b5f730455b
files xenpci/xenpci_fdo.c
line diff
     1.1 --- a/xenpci/xenpci_fdo.c	Fri Jul 11 11:31:40 2008 +1000
     1.2 +++ b/xenpci/xenpci_fdo.c	Fri Jul 11 14:05:34 2008 +1000
     1.3 @@ -358,7 +358,6 @@ XenPci_Suspend(
     1.4    int cancelled;
     1.5    PIO_WORKITEM work_item;
     1.6    PXEN_CHILD child;
     1.7 -  int i;
     1.8    //PUCHAR gnttbl_backup[PAGE_SIZE * NR_GRANT_FRAMES];
     1.9  
    1.10    UNREFERENCED_PARAMETER(Dpc);
    1.11 @@ -374,8 +373,7 @@ XenPci_Suspend(
    1.12      KeMemoryBarrier();
    1.13      while(suspend_info->do_spin)
    1.14      {
    1.15 -      for (i = 0; i < 65536; i++)
    1.16 -        __asm { hlt }
    1.17 +      KeStallExecutionProcessor(1);
    1.18        KeMemoryBarrier();
    1.19        /* can't call HYPERVISOR_yield() here as the stubs will be reset and we will crash */
    1.20      }
    1.21 @@ -394,8 +392,8 @@ XenPci_Suspend(
    1.22    KdPrint((__DRIVER_NAME "     waiting for all other processors to spin\n"));
    1.23    while (suspend_info->nr_spinning < (LONG)ActiveProcessorCount - 1)
    1.24    {
    1.25 -      __asm { hlt }
    1.26        HYPERVISOR_yield(xpdd);
    1.27 +      KeMemoryBarrier();
    1.28    }
    1.29    KdPrint((__DRIVER_NAME "     all other processors are spinning\n"));
    1.30  
    1.31 @@ -422,6 +420,7 @@ XenPci_Suspend(
    1.32    
    1.33    KdPrint((__DRIVER_NAME "     waiting for all other processors to stop spinning\n"));
    1.34    suspend_info->do_spin = 0;
    1.35 +  KeMemoryBarrier();
    1.36  
    1.37  	work_item = IoAllocateWorkItem(xpdd->common.fdo);
    1.38  	IoQueueWorkItem(work_item, XenPci_CompleteResume, DelayedWorkQueue, suspend_info);