The following reply was made to PR kern/153511; it has been noted by GNATS.

From: (dfilter service)
Subject: Re: kern/153511: commit references a PR
Date: Thu, 30 Dec 2010 01:29:04 +0000 (UTC)

 Author: cperciva
 Date: Thu Dec 30 01:28:56 2010
 New Revision: 216812
   Add xenpic_dynirq_disable_intr and set it as the .pic_disable_intr method
   for xenpic_dynirq_template.  This fixes a panic when a virtual disk is
   removed, since that results in an interrupt channel being disabled and
   NULL isn't very good function for disabling interrupts.
   We should probably have a xenpic_pirq_disable_intr as well; I'm not adding
   that here because (a) I'm not sure what uses pirqs so I don't have a test
   case, and (b) the xenpic_pirq_enable_intr code is significantly more
   complex than the xenpic_dynirq_enable_intr code, so I'm not sure what
   should go into a xenpic_pirq_disable_intr routine.
   PR:          kern/153511
   MFC after:   3 days
 Modified: head/sys/xen/evtchn/evtchn.c
 --- head/sys/xen/evtchn/evtchn.c       Thu Dec 30 01:13:42 2010        
 +++ head/sys/xen/evtchn/evtchn.c       Thu Dec 30 01:28:56 2010        
 @@ -628,6 +628,7 @@ static void     xenpic_dynirq_enable_sou
  static void     xenpic_dynirq_disable_source(struct intsrc *isrc, int); 
  static void     xenpic_dynirq_eoi_source(struct intsrc *isrc); 
  static void     xenpic_dynirq_enable_intr(struct intsrc *isrc); 
 +static void     xenpic_dynirq_disable_intr(struct intsrc *isrc); 
  static void     xenpic_pirq_enable_source(struct intsrc *isrc); 
  static void     xenpic_pirq_disable_source(struct intsrc *isrc, int); 
 @@ -647,6 +648,7 @@ struct pic xenpic_dynirq_template  =  { 
        .pic_disable_source     =       xenpic_dynirq_disable_source,
        .pic_eoi_source         =       xenpic_dynirq_eoi_source, 
        .pic_enable_intr        =       xenpic_dynirq_enable_intr, 
 +      .pic_disable_intr       =       xenpic_dynirq_disable_intr,
        .pic_vector             =       xenpic_vector, 
        .pic_source_pending     =       xenpic_source_pending,
        .pic_suspend            =       xenpic_suspend, 
 @@ -716,6 +718,20 @@ xenpic_dynirq_enable_intr(struct intsrc 
  static void 
 +xenpic_dynirq_disable_intr(struct intsrc *isrc)
 +      unsigned int irq;
 +      struct xenpic_intsrc *xp;
 +      xp = (struct xenpic_intsrc *)isrc;      
 +      mtx_lock_spin(&irq_mapping_update_lock);
 +      irq = xenpic_vector(isrc);
 +      mask_evtchn(evtchn_from_irq(irq));
 +      xp->xp_masked = 1;
 +      mtx_unlock_spin(&irq_mapping_update_lock);
 +static void 
  xenpic_dynirq_eoi_source(struct intsrc *isrc)
        unsigned int irq;
 _______________________________________________ mailing list
 To unsubscribe, send any mail to ""
_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to