diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-03-30 11:47:05 -0700 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-05-07 14:35:00 +0200 |
commit | 5e2b930b0784a30c98dee8e9d79c1f84c31f7209 (patch) | |
tree | fae90c6dd23adf8d154ddd20492bf2efb61e1c29 /drivers/iommu/intr_remapping.c | |
parent | 9d619f65722236e0e0c35467d1528caed206e439 (diff) | |
download | linux-5e2b930b0784a30c98dee8e9d79c1f84c31f7209.tar.bz2 |
iommu/vt-d: Convert MSI remapping setup to remap_ops
This patch introduces remapping-ops for setting ups MSI
interrupts.
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 | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/iommu/intr_remapping.c b/drivers/iommu/intr_remapping.c index a68d304f9729..9dc179316ba1 100644 --- a/drivers/iommu/intr_remapping.c +++ b/drivers/iommu/intr_remapping.c @@ -127,3 +127,38 @@ void intr_free_irq(int irq) remap_ops->free_irq(irq); } + +void intr_compose_msi_msg(struct pci_dev *pdev, + unsigned int irq, unsigned int dest, + struct msi_msg *msg, u8 hpet_id) +{ + if (!remap_ops || !remap_ops->compose_msi_msg) + return; + + remap_ops->compose_msi_msg(pdev, irq, dest, msg, hpet_id); +} + +int intr_msi_alloc_irq(struct pci_dev *pdev, int irq, int nvec) +{ + if (!remap_ops || !remap_ops->msi_alloc_irq) + return -ENODEV; + + return remap_ops->msi_alloc_irq(pdev, irq, nvec); +} + +int intr_msi_setup_irq(struct pci_dev *pdev, unsigned int irq, + int index, int sub_handle) +{ + if (!remap_ops || !remap_ops->msi_setup_irq) + return -ENODEV; + + return remap_ops->msi_setup_irq(pdev, irq, index, sub_handle); +} + +int intr_setup_hpet_msi(unsigned int irq, unsigned int id) +{ + if (!remap_ops || !remap_ops->setup_hpet_msi) + return -ENODEV; + + return remap_ops->setup_hpet_msi(irq, id); +} |