From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 05/15] xen/arm: segregate GIC low level functionality Date: Wed, 09 Apr 2014 09:36:39 +0100 Message-ID: <53450697.8040506@linaro.org> References: <1396612593-443-1-git-send-email-vijay.kilari@gmail.com> <1396612593-443-6-git-send-email-vijay.kilari@gmail.com> <533EB9C4.3020709@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari Cc: Ian Campbell , Stefano Stabellini , Prasun Kapoor , Vijaya Kumar K , xen-devel@lists.xen.org, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 09/04/14 08:43, Vijay Kilari wrote: >>> + unsigned int (*nr_lines)(void); >>> + unsigned int (*nr_lrs)(void); >> >> I don't think we need a callbacks for both of them. 2 unsigned int are fine. > nr_lines returns number of gic lines supported. > nr_lrs returns number of LR registers supported. I know it ... my point is to replace the both callbacks by: unsigned nr_lines; unsigned nr_lrs; We don't have to use functions as it won't change after boot setup. > >> >> [..] >> >>> + void (*enable_irq)(int); >>> + void (*disable_irq)(int); >>> + void (*eoi_irq)(int); >>> + void (*deactivate_irq)(int); >>> + unsigned int (*ack_irq)(void); >> >> I would prefer to introduce a new hw_irq_controller here rather than >> adding another abstraction. >> > hw_irq_controller can be used only for enable_irq, disable_irq & eoi_irq. > other callbacks in hw_irq_controller cannot be used. > > Ex: ack_irq in our case returns the irq where as 'ack' callback in > hw_irq_controller > does not return a value. So not suitable here. Hmmm... rigth for deactivate_irq and ack_irq. For the others you can definitely use the hw_irq_controller. Regards, -- Julien Grall