From: Ian Campbell Subject: Re: [PATCH 4/6] xen/arm: implement gic_irq_enable and gic_irq_disable Date: Mon, 9 Dec 2013 17:42:49 +0000 Message-ID: <1386610969.7812.93.camel@kazak.uk.xensource.com> References: <1386350808-13648-4-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1386350808-13648-4-git-send-email-stefano.stabellini@eu.citrix.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: Stefano Stabellini Cc: julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 > --- > 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 > - > - 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)