From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 11/16] xen/arm: move vgic defines to vgic header file Date: Wed, 16 Apr 2014 18:01:53 +0100 Message-ID: <534EB781.2070605@linaro.org> References: <1397560675-29861-1-git-send-email-vijay.kilari@gmail.com> <1397560675-29861-12-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397560675-29861-12-git-send-email-vijay.kilari@gmail.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: vijay.kilari@gmail.com Cc: Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com, Prasun.Kapoor@caviumnetworks.com, vijaya.kumar@caviumnetworks.com, xen-devel@lists.xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org Hello Vijaya, Thank you for the patch. On 04/15/2014 12:17 PM, vijay.kilari@gmail.com wrote: > From: Vijaya Kumar K > > gic.h contains defines of vgic. Move these to vgic > header file. Also move inline functions and defines > in vgic.c to vgic.h Can you explain in the commit message, why you need to move theses functions in the header? > Signed-off-by: Vijaya Kumar K [..] > -extern int gic_hw_version(void); > - > -extern int domain_vgic_init(struct domain *d); > -extern void domain_vgic_free(struct domain *d); > - > -extern int vcpu_vgic_init(struct vcpu *v); > - > -extern void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq); > -extern void vgic_clear_pending_irqs(struct vcpu *v); > extern struct pending_irq *irq_to_pending(struct vcpu *v, unsigned int irq); > +extern int gic_hw_version(void); Why did you change the place of gic_hw_version in the code? > /* Program the GIC to route an interrupt with a dt_irq */ > extern void gic_route_dt_irq(const struct dt_irq *irq, > diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h > index 104a87d..f9d6549 100644 > --- a/xen/include/asm-arm/vgic.h > +++ b/xen/include/asm-arm/vgic.h > @@ -17,6 +17,7 @@ > > #ifndef __ASM_ARM_VGIC_H__ > #define __ASM_ARM_VGIC_H__ > +#include > > /* Represents state corresponding to a block of 32 interrupts */ > struct vgic_irq_rank { > @@ -27,6 +28,52 @@ struct vgic_irq_rank { > uint32_t itargets[8]; > }; > > +/* Number of ranks of interrupt registers for a domain */ > +#define DOMAIN_NR_RANKS(d) (((d)->arch.vgic.nr_lines+31)/32) [..] > +static inline int REG_RANK_NR(int b, uint32_t n) [..] > +static inline int is_vcpu_running(struct domain *d, int vcpuid) The name of the 2 functions and 1 define are too generic. It was fine internally but not to be exported. Please find new names Regards, -- Julien Grall