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

Re: [Xen-devel] [PATCH 4/6] xen/arm: implement gic_irq_enable and gic_irq_disable



On Fri, 2013-12-06 at 17:26 +0000, Stefano Stabellini wrote:
> Rename gic_irq_startup to gic_irq_enable.
> Rename gic_irq_shutdown to gic_irq_disable.
> 
> Implement gic_irq_startup and gic_irq_shutdown calling gic_irq_enable
> and gic_irq_disable.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> ---
>  xen/arch/arm/gic.c |   15 +++++++--------
>  1 file changed, 7 insertions(+), 8 deletions(-)
> 
> diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> index a8a5c2a..5ec3ff9 100644
> --- a/xen/arch/arm/gic.c
> +++ b/xen/arch/arm/gic.c
> @@ -129,7 +129,7 @@ void gic_restore_state(struct vcpu *v)
>      gic_restore_pending_irqs(v);
>  }
>  
> -static unsigned int gic_irq_startup(struct irq_desc *desc)
> +static void gic_irq_enable(struct irq_desc *desc)
>  {
>      uint32_t enabler;
>      int irq = desc->irq;
> @@ -137,11 +137,9 @@ static unsigned int gic_irq_startup(struct irq_desc 
> *desc)
>      /* Enable routing */
>      enabler = GICD[GICD_ISENABLER + irq / 32];
>      GICD[GICD_ISENABLER + irq / 32] = enabler | (1u << (irq % 32));

"enabler | " here is not necessary for the same reasons it was wrong in
gic_irq_disable. It's more benign here but I think it should be fixed
anyway.

This patch itself is OK though:
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> -
> -    return 0;
>  }
>  
> -static void gic_irq_shutdown(struct irq_desc *desc)
> +static void gic_irq_disable(struct irq_desc *desc)
>  {
>      int irq = desc->irq;
>  
> @@ -149,14 +147,15 @@ static void gic_irq_shutdown(struct irq_desc *desc)
>      GICD[GICD_ICENABLER + irq / 32] = (1u << (irq % 32));
>  }
>  
> -static void gic_irq_enable(struct irq_desc *desc)
> +static unsigned int gic_irq_startup(struct irq_desc *desc)
>  {
> -
> +    gic_irq_enable(desc);
> +    return 0;
>  }
>  
> -static void gic_irq_disable(struct irq_desc *desc)
> +static void gic_irq_shutdown(struct irq_desc *desc)
>  {
> -
> +    gic_irq_disable(desc);
>  }
>  
>  static void gic_irq_ack(struct irq_desc *desc)



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