From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 18/18] xen/arm: IRQ: Handle multiple action per IRQ Date: Wed, 23 Apr 2014 15:07:53 +0100 Message-ID: <1398262073.18537.129.camel@kazak.uk.xensource.com> References: <1398171530-27391-1-git-send-email-julien.grall@linaro.org> <1398171530-27391-19-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WcxqJ-0006R4-An for xen-devel@lists.xenproject.org; Wed, 23 Apr 2014 14:08:07 +0000 In-Reply-To: <1398171530-27391-19-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, Keir Fraser , tim@xen.org, Jan Beulich , stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org 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 > Cc: Keir Fraser > Cc: Jan Beulich > > --- > 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? > + 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? Ian.