diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-03-30 11:47:02 -0700 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-05-07 14:34:59 +0200 |
commit | 0c3f173a88c4ae3e4253427cf574a59ad5352918 (patch) | |
tree | d34364dc8d7926de75ec486ce579b478d23098e3 /drivers/iommu/intr_remapping.c | |
parent | 4f3d8b67ad3090f9fb72f8235d21cde53cd24b79 (diff) |
iommu/vt-d: Convert IR ioapic-setup to use remap_ops
The IOAPIC setup routine for interrupt remapping is VT-d
specific. Move it to the irq_remap_ops and add a call helper
function.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/intr_remapping.c')
-rw-r--r-- | drivers/iommu/intr_remapping.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/iommu/intr_remapping.c b/drivers/iommu/intr_remapping.c index 9aabed7c032..739148ab253 100644 --- a/drivers/iommu/intr_remapping.c +++ b/drivers/iommu/intr_remapping.c @@ -98,3 +98,15 @@ int __init intr_enable_fault_handling(void) return remap_ops->enable_faulting(); } + +int intr_setup_ioapic_entry(int irq, + struct IO_APIC_route_entry *entry, + unsigned int destination, int vector, + struct io_apic_irq_attr *attr) +{ + if (!remap_ops || !remap_ops->setup_ioapic_entry) + return -ENODEV; + + return remap_ops->setup_ioapic_entry(irq, entry, destination, + vector, attr); +} |