win-pvdrivers

changeset 834:985d93aa2d46

cleanup
author James Harper <james.harper@bendigoit.com.au>
date Wed Jan 26 12:13:47 2011 +1100 (2011-01-26)
parents 66e79b88f301
children e5651aba4e03
files xenpci/evtchn.c
line diff
     1.1 --- a/xenpci/evtchn.c	Wed Jan 26 12:13:19 2011 +1100
     1.2 +++ b/xenpci/evtchn.c	Wed Jan 26 12:13:47 2011 +1100
     1.3 @@ -170,22 +170,31 @@ to CPU != 0, but we should always use vc
     1.4          KdPrint((__DRIVER_NAME "     EVT_ACTION_TYPE_SUSPEND\n"));
     1.5          for (i = 0; i < ARRAY_SIZE(xpdd->evtchn_pending_pvt[pcpu]); i++)
     1.6          {
     1.7 -          if (xpdd->ev_actions[i].type == EVT_ACTION_TYPE_IRQ)
     1.8 +          switch(xpdd->ev_actions[i].type)
     1.9            {
    1.10 -            int suspend_bit = i & (BITS_PER_LONG - 1);
    1.11 -            int suspend_word = i >> BITS_PER_LONG_SHIFT;
    1.12 -            synch_set_bit(suspend_bit, (volatile xen_long_t *)&xpdd->evtchn_pending_pvt[pcpu][suspend_word]);
    1.13 -          }
    1.14 -          else if (xpdd->ev_actions[i].type == EVT_ACTION_TYPE_NORMAL && xpdd->ev_actions[i].ServiceRoutine)
    1.15 -          {
    1.16 -            xpdd->ev_actions[i].ServiceRoutine(xpdd->ev_actions[i].ServiceContext);
    1.17 +          case EVT_ACTION_TYPE_IRQ:
    1.18 +            {
    1.19 +              int suspend_bit = i & (BITS_PER_LONG - 1);
    1.20 +              int suspend_word = i >> BITS_PER_LONG_SHIFT;
    1.21 +              synch_set_bit(suspend_bit, (volatile xen_long_t *)&xpdd->evtchn_pending_pvt[pcpu][suspend_word]);
    1.22 +            }
    1.23 +            break;
    1.24 +          case EVT_ACTION_TYPE_NORMAL:
    1.25 +            if (xpdd->ev_actions[i].ServiceRoutine)
    1.26 +            {
    1.27 +              xpdd->ev_actions[i].ServiceRoutine(xpdd->ev_actions[i].ServiceContext);
    1.28 +            }
    1.29 +            break;
    1.30 +          case EVT_ACTION_TYPE_DPC:
    1.31 +            KeInsertQueueDpc(&xpdd->ev_actions[i].Dpc, NULL, NULL);
    1.32 +            break;
    1.33            }
    1.34          }
    1.35          KeInsertQueueDpc(&ev_action->Dpc, NULL, NULL);
    1.36          deferred = TRUE;
    1.37          break;
    1.38        default:
    1.39 -        KdPrint((__DRIVER_NAME "     Unhandled Event!!!\n"));
    1.40 +        KdPrint((__DRIVER_NAME "     Unhandled Event!!! port=%d\n", port));
    1.41          break;
    1.42        }
    1.43      }