summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <joro@8bytes.org>2012-09-26 12:44:47 +0200
committerJoerg Roedel <joro@8bytes.org>2013-01-28 12:17:27 +0100
commit11b4a1cc3836ac71a214446d350e923c76012368 (patch)
tree12619f2037db0a552f1a363e6156d16d1844088e /drivers/iommu
parent9f9d39e403faf5e1a22334fe4df96516e4f389a8 (diff)
downloadop-kernel-dev-11b4a1cc3836ac71a214446d350e923c76012368.zip
op-kernel-dev-11b4a1cc3836ac71a214446d350e923c76012368.tar.gz
x86, irq: Move irq_remapped() check into free_remapped_irq
The function is called unconditionally now in IO-APIC code removing another irq_remapped() check from x86 core code. Signed-off-by: Joerg Roedel <joro@8bytes.org> Acked-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/irq_remapping.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index 75afdf4..cff0478 100644
--- a/drivers/iommu/irq_remapping.c
+++ b/drivers/iommu/irq_remapping.c
@@ -282,10 +282,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 (irq_remapped(cfg))
+ remap_ops->free_irq(irq);
}
void compose_remapped_msi_msg(struct pci_dev *pdev,
OpenPOWER on IntegriCloud