From: Ian Campbell Subject: Re: [PATCH for-4.5 7/8] xen/irq: Handle multiple action per IRQ Date: Mon, 24 Feb 2014 14:12:57 +0000 Message-ID: <1393251177.16570.69.camel@kazak.uk.xensource.com> References: <1390581822-32624-1-git-send-email-julien.grall@linaro.org> <1390581822-32624-8-git-send-email-julien.grall@linaro.org> <1392810905.29739.19.camel@kazak.uk.xensource.com> <530673BD.9010301@linaro.org> <530B5275.7010008@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHwHW-00027c-1E for xen-devel@lists.xenproject.org; Mon, 24 Feb 2014 14:13:18 +0000 In-Reply-To: <530B5275.7010008@citrix.com> 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: Keir Fraser , patches@linaro.org, Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-02-24 at 14:08 +0000, Julien Grall wrote: > (Adding Jan for x86 part). > > On 02/20/2014 09:29 PM, Julien Grall wrote: > > Hi Ian, > > > > On 02/19/2014 11:55 AM, Ian Campbell wrote: > >> On Fri, 2014-01-24 at 16:43 +0000, Julien Grall wrote: > >>> On ARM, it may happen (eg ARM SMMU) to setup multiple handler for the same > >>> interrupt. > >> > >> Mention here that you are therefore creating a linked list of actions > >> for each interrupt. > >> > >> If you use xen/list.h for this then you get a load of helpers and > >> iterators which would save you open coding them. > > > > After thinking, using xen/list.h won't really remove open code, except > > removing "action_ptr" in release_dt_irq. You can list_for_each*() in do_IRQ too and in release_dt_irq you get to use a well debugged list delete implementation instead of reimplementing your own. > > Calling release_dt_irq to an IRQ with multiple action shouldn't be > > called often. Therefore, having both prev and next is a waste of space. If this is a concern we could take in the Linux single linked list macros alongside the existing doubly linked ines we took from them. Ian. > Jan, as it's common code, do you have any thoughts? >