WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xen: do not unmask disabled IRQ on eoi.

>>> On 15.10.10 at 19:03, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> 
>>> wrote:
> @@ -1074,9 +1081,6 @@ static void __xen_evtchn_do_upcall(struct pt_regs 
> *regs)
>                               int irq = evtchn_to_irq[port];
>                               struct irq_desc *desc;
>  
> -                             mask_evtchn(port);
> -                             clear_evtchn(port);
> -
>                               if (irq != -1) {
>                                       desc = irq_to_desc(irq);
>                                       if (desc)
> @@ -1202,7 +1206,7 @@ static void ack_dynirq(unsigned int irq)
>       move_masked_irq(irq);
>  
>       if (VALID_EVTCHN(evtchn))
> -             unmask_evtchn(evtchn);
> +             clear_evtchn(evtchn);
>  }
>  
>  static int retrigger_irq(unsigned int irq)

These two hunks together don't look right, for two reasons: First,
ack_dynirq() is used as both .eoi and .ack, but those certainly
have different requirements (and this might have been a problem
already before, though I didn't spend much thought on what may
go wrong). Second, clearing the event channel in the .eoi handler
after it wasn't masked while being handled has the potential of
losing an event (if it got raised between the IRQ handler checking
relevant state and the execution of clear_evtchn()).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel