[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 11/16] xen/arm: move vgic defines to vgic header file



Hello Vijaya,

Thank you for the patch.

On 04/15/2014 12:17 PM, vijay.kilari@xxxxxxxxx wrote:
> From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>
> 
> 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 <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx>

[..]

> -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 <xen/bitops.h>
>  
>  /* 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.