summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorJoerg Roedel <joro@8bytes.org>2012-09-26 10:44:48 (GMT)
committerJoerg Roedel <joro@8bytes.org>2013-01-28 11:17:28 (GMT)
commit2976fd8417f5744de3bb9109e4f30f353a36b1c0 (patch)
tree7c39a649cacb45c12ccf88aa16783741cbdce037 /drivers/iommu
parent11b4a1cc3836ac71a214446d350e923c76012368 (diff)
downloadlinux-2976fd8417f5744de3bb9109e4f30f353a36b1c0.tar.xz
x86, irq: Introduce setup_remapped_irq()
This function does irq-remapping specific interrupt setup like modifying the chip defaults. 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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c
index cff0478..339260c 100644
--- a/drivers/iommu/irq_remapping.c
+++ b/drivers/iommu/irq_remapping.c
@@ -355,3 +355,12 @@ void irq_remap_modify_chip_defaults(struct irq_chip *chip)
chip->irq_eoi = ir_ack_apic_level;
chip->irq_set_affinity = x86_io_apic_ops.set_affinity;
}
+
+bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip)
+{
+ if (!irq_remapped(cfg))
+ return false;
+ irq_set_status_flags(irq, IRQ_MOVE_PCNTXT);
+ irq_remap_modify_chip_defaults(chip);
+ return true;
+}