ia64/xen-unstable

changeset 2121:0064c2d431f4

bitkeeper revision 1.1159.1.11 (41167ad4Yx3OUTmkAYwUL5rDLiIUbA)

It is safe for inter-dom event channels to still be bound during suspend.
Normal driver restart mechanisms will clean things up during resume.
author kaf24@scramble.cl.cam.ac.uk
date Sun Aug 08 19:11:16 2004 +0000 (2004-08-08)
parents de0a88369f30
children eb5e0b2dcb3e
files linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c
line diff
     1.1 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c	Sun Aug 08 17:53:28 2004 +0000
     1.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/evtchn.c	Sun Aug 08 19:11:16 2004 +0000
     1.3 @@ -380,7 +380,7 @@ static struct irqaction misdirect_action
     1.4  
     1.5  void irq_suspend(void)
     1.6  {
     1.7 -    int virq, irq, evtchn;
     1.8 +    int pirq, virq, irq, evtchn;
     1.9  
    1.10      /* Unbind VIRQs from event channels. */
    1.11      for ( virq = 0; virq < NR_VIRQS; virq++ )
    1.12 @@ -394,16 +394,13 @@ void irq_suspend(void)
    1.13          irq_to_evtchn[irq]    = -1;
    1.14      }
    1.15  
    1.16 -    /*
    1.17 -     * We should now be unbound from all event channels. Stale bindings to 
    1.18 -     * PIRQs and/or inter-domain event channels will cause us to barf here.
    1.19 -     */
    1.20 -    for ( evtchn = 0; evtchn < NR_EVENT_CHANNELS; evtchn++ )
    1.21 -        if ( evtchn_to_irq[evtchn] != -1 )
    1.22 -            panic("Suspend attempted while bound to evtchn %d.\n", evtchn);
    1.23 +    /* Check that no PIRQs are still bound. */
    1.24 +    for ( pirq = 0; pirq < NR_PIRQS; pirq++ )
    1.25 +        if ( (evtchn = irq_to_evtchn[pirq_to_irq(pirq)]) != -1 )
    1.26 +            panic("Suspend attempted while PIRQ %d bound to evtchn %d.\n",
    1.27 +                  pirq, evtchn);
    1.28  }
    1.29  
    1.30 -
    1.31  void irq_resume(void)
    1.32  {
    1.33      evtchn_op_t op;