summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/irq_remapping.c
diff options
context:
space:
mode:
authorJoerg Roedel <joro@8bytes.org>2012-09-26 12:44:48 +0200
committerJoerg Roedel <joro@8bytes.org>2013-01-28 12:17:28 +0100
commit2976fd8417f5744de3bb9109e4f30f353a36b1c0 (patch)
tree7c39a649cacb45c12ccf88aa16783741cbdce037 /drivers/iommu/irq_remapping.c
parent11b4a1cc3836ac71a214446d350e923c76012368 (diff)
downloadblackbird-op-linux-2976fd8417f5744de3bb9109e4f30f353a36b1c0.tar.gz
blackbird-op-linux-2976fd8417f5744de3bb9109e4f30f353a36b1c0.zip
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/irq_remapping.c')
-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 cff04789e1a3..339260c98cf9 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;
+}
OpenPOWER on IntegriCloud