[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120925132941.GA2505@amd.com>
Date: Tue, 25 Sep 2012 15:29:41 +0200
From: Joerg Roedel <joerg.roedel@....com>
To: Sebastian Andrzej Siewior <sebastian@...akpoint.cc>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
<joro@...tes.org>, Suresh Siddha <suresh.b.siddha@...el.com>,
Yinghai Lu <yinghai@...nel.org>
Subject: Re: [PATCH 15/19] x86, irq: Move irq_remapped() check into
free_remapped_irq
On Sun, Aug 26, 2012 at 08:27:55PM +0200, Sebastian Andrzej Siewior wrote:
> On Mon, Aug 20, 2012 at 03:56:01PM +0200, Joerg Roedel wrote:
> > --- a/arch/x86/kernel/apic/io_apic.c
> > +++ b/arch/x86/kernel/apic/io_apic.c
> > @@ -2981,8 +2981,8 @@ void destroy_irq(unsigned int irq)
> >
> > irq_set_status_flags(irq, IRQ_NOREQUEST|IRQ_NOPROBE);
> >
> > - if (irq_remapped(cfg))
> > - free_remapped_irq(irq);
> > + free_remapped_irq(irq);
> > +
> > raw_spin_lock_irqsave(&vector_lock, flags);
> > __clear_irq_vector(irq, cfg);
> > raw_spin_unlock_irqrestore(&vector_lock, flags);
> > diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
> > index 3957fb2..f2affc7 100644
> > --- a/drivers/iommu/irq_remapping.c
> > +++ b/drivers/iommu/irq_remapping.c
> > @@ -229,10 +229,13 @@ int set_remapped_irq_affinity(struct irq_data *data, const struct cpumask *mask,
> >
> > void free_remapped_irq(int irq)
> > {
> > + struct irq_cfg *cfg = irq_get_chip_data(irq);
> > +
> > if (!remap_ops || !remap_ops->free_irq)
> > return;
> >
> > - remap_ops->free_irq(irq);
> > + if (cfg && irq_remapped(cfg))
>
> You shuffle code with the exception that you now check for cfg. Why?
Just to be sure it is not NULL, but looking again at the previous code
it is not necessary. I remove the check for cfg.
Joerg
--
AMD Operating System Research Center
Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists