From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] irq: Remove irqaction.free_on_release Date: Tue, 09 Oct 2012 12:44:56 +0100 Message-ID: References: <37f1afbec80b0f052aec.1349701772@andrewcoop.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <37f1afbec80b0f052aec.1349701772@andrewcoop.uk.xensource.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: Andrew Cooper , xen-devel@lists.xen.org Cc: Ian Campbell , Jan Beulich , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org But reasoning behind c/s 20153, which introduced it, still applies? Callers using setup_irq() don't want their passed-in irqaction to be xfree()ed? -- Keir On 08/10/2012 14:09, "Andrew Cooper" wrote: > It is always set to 1, and only checked on some of the codepaths which free an > irqaction. > > Signed-off-by: Andrew Cooper > > -- > This patch does touch common code as well as x86 and arm architectures, > so probably needs quite a few acks. > > diff -r 5fbdbf585f5f -r 37f1afbec80b xen/arch/arm/gic.c > --- a/xen/arch/arm/gic.c > +++ b/xen/arch/arm/gic.c > @@ -373,7 +373,7 @@ void __init release_irq(unsigned int irq > /* Wait to make sure it's not being used on another CPU */ > do { smp_mb(); } while ( desc->status & IRQ_INPROGRESS ); > > - if (action && action->free_on_release) > + if ( action ) > xfree(action); > } > > diff -r 5fbdbf585f5f -r 37f1afbec80b xen/arch/arm/irq.c > --- a/xen/arch/arm/irq.c > +++ b/xen/arch/arm/irq.c > @@ -97,7 +97,6 @@ int __init request_irq(unsigned int irq, > action->handler = handler; > action->name = devname; > action->dev_id = dev_id; > - action->free_on_release = 1; > > retval = setup_irq(irq, action); > if (retval) > diff -r 5fbdbf585f5f -r 37f1afbec80b xen/arch/x86/irq.c > --- a/xen/arch/x86/irq.c > +++ b/xen/arch/x86/irq.c > @@ -952,7 +952,6 @@ int __init request_irq(unsigned int irq, > action->handler = handler; > action->name = devname; > action->dev_id = dev_id; > - action->free_on_release = 1; > > retval = setup_irq(irq, action); > if (retval) > @@ -979,7 +978,7 @@ void __init release_irq(unsigned int irq > /* Wait to make sure it's not being used on another CPU */ > do { smp_mb(); } while ( desc->status & IRQ_INPROGRESS ); > > - if (action && action->free_on_release) > + if ( action ) > xfree(action); > } > > diff -r 5fbdbf585f5f -r 37f1afbec80b xen/include/xen/irq.h > --- a/xen/include/xen/irq.h > +++ b/xen/include/xen/irq.h > @@ -13,7 +13,6 @@ struct irqaction { > void (*handler)(int, void *, struct cpu_user_regs *); > const char *name; > void *dev_id; > - bool_t free_on_release; > }; > > /*