aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/irq_remapping.c
diff options
context:
space:
mode:
authorJoerg Roedel <joro@8bytes.org>2012-09-26 06:44:48 -0400
committerJoerg Roedel <joro@8bytes.org>2013-01-28 06:17:28 -0500
commit2976fd8417f5744de3bb9109e4f30f353a36b1c0 (patch)
tree7c39a649cacb45c12ccf88aa16783741cbdce037 /drivers/iommu/irq_remapping.c
parent11b4a1cc3836ac71a214446d350e923c76012368 (diff)
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)
355 chip->irq_eoi = ir_ack_apic_level; 355 chip->irq_eoi = ir_ack_apic_level;
356 chip->irq_set_affinity = x86_io_apic_ops.set_affinity; 356 chip->irq_set_affinity = x86_io_apic_ops.set_affinity;
357} 357}
358
359bool setup_remapped_irq(int irq, struct irq_cfg *cfg, struct irq_chip *chip)
360{
361 if (!irq_remapped(cfg))
362 return false;
363 irq_set_status_flags(irq, IRQ_MOVE_PCNTXT);
364 irq_remap_modify_chip_defaults(chip);
365 return true;
366}