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

Re: [Xen-devel] [PATCH v5 05/21] xen/arm: use ioremap to map gic-v2 registers



On Thu, 2014-06-12 at 19:06 +0530, vijay.kilari@xxxxxxxxx wrote:
>  static void gic_restore_pending_irqs(struct vcpu *v);
>  
>  /* Global state */
>  static struct {
>      paddr_t dbase;       /* Address of distributor registers */
> +    void __iomem * map_dbase;  /* IO mapped Address of distributor registers 
> */

I wonder, do we still need the paddr_t ?base members after this change?

>      paddr_t cbase;       /* Address of CPU interface registers */
> +    void __iomem * map_cbase; /* IO mapped Address of CPU interface 
> registers*/
>      paddr_t hbase;       /* Address of virtual interface registers */
> +    void __iomem * map_hbase; /* IO Address of virtual interface registers */
>      paddr_t vbase;       /* Address of virtual cpu interface registers */
>      unsigned int lines;  /* Number of interrupts (SPIs + PPIs + SGIs) */
>      unsigned int maintenance_irq; /* IRQ maintenance */
> @@ -139,8 +142,7 @@ static void gic_irq_enable(struct irq_desc *desc)
>      spin_lock_irqsave(&gic.lock, flags);
>      desc->status &= ~IRQ_DISABLED;
>      dsb(sy);
> -    /* Enable routing */

Please keep this comment.

> @@ -58,7 +58,7 @@ static inline int REG_RANK_NR(int b, uint32_t n)
>   * Offset of GICD_<FOO><n> with its rank, for GICD_<FOO> with
>   * <b>-bits-per-interrupt.
>   */
> -#define REG_RANK_INDEX(b, n) ((n) & ((b)-1))
> +#define REG_RANK_INDEX(b, n) (((n) >> 2) & ((b)-1))
>  
>  /*
>   * Returns rank corresponding to a GICD_<FOO><n> register for
> @@ -66,7 +66,7 @@ static inline int REG_RANK_NR(int b, uint32_t n)
>   */
>  static struct vgic_irq_rank *vgic_irq_rank(struct vcpu *v, int b, int n)
>  {
> -    int rank = REG_RANK_NR(b, n);
> +    int rank = REG_RANK_NR(b, (n >> 2));

I think there must be better ways to do this than sprinkling >> 2 around
the place (e.g. a helper macro), but OK for now.

With the missing comment reinstated and the spelling error which Julien
mentioned: Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Ian.


_______________________________________________
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®.