[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 18/18] xen/arm: IRQ: Handle multiple action per IRQ
On 04/23/2014 03:07 PM, Ian Campbell wrote: > On Tue, 2014-04-22 at 13:58 +0100, Julien Grall wrote: >> On ARM, it may happen (eg ARM SMMU) to setup multiple handler for the same >> interrupt. >> >> To be able to use multiple action, the driver has to explicitly call >> {setup,request}_irq with IRQF_SHARED as 2nd parameter. >> >> The behavior stays the same on x86, e.g only one action is handled. >> >> Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> >> Cc: Keir Fraser <keir@xxxxxxx> >> Cc: Jan Beulich <jbeulich@xxxxxxxx> >> >> --- >> Changes in v4: >> - Go back to a single custom linked list. The double linked-list >> doesn't fit the requirements (i.e browsing safely without look) and >> the llist.h from Linux doesn't allow use to delete a node in the >> middle >> of the list. > > Is this variant any safer? Yes, everything is protected by a desc->lock, except in do_IRQ (see below why). >> + do >> + { >> + action->handler(irq, action->dev_id, regs); >> + action = action->next; >> + } while ( action ); > > What happens if action is freed and recycled in the midst of this loop? Nothing, the action won't be free until IRQ_INPROGRESS is set (see do .. while at the end of release_irq). Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |