diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-06-26 10:46:04 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-09-28 11:43:52 -0400 |
commit | 6b474b8224cdb473f19e8c925171e608499cc45d (patch) | |
tree | d52191a42b4b9292b1908003245abcf852c6919b /drivers/iommu/amd_iommu.c | |
parent | d976195c93bce4512e990d170858d20d71c95c45 (diff) |
iommu/amd: Add initialization routines for AMD interrupt remapping
Add the six routines required to setup interrupt remapping
with the AMD IOMMU. Also put it all together into the AMD
specific irq_remap_ops.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/amd_iommu.c')
-rw-r--r-- | drivers/iommu/amd_iommu.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index aeb890c35f7e..33f144f7d676 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c | |||
@@ -45,6 +45,7 @@ | |||
45 | 45 | ||
46 | #include "amd_iommu_proto.h" | 46 | #include "amd_iommu_proto.h" |
47 | #include "amd_iommu_types.h" | 47 | #include "amd_iommu_types.h" |
48 | #include "irq_remapping.h" | ||
48 | 49 | ||
49 | #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) | 50 | #define CMD_SET_TYPE(cmd, t) ((cmd)->data[1] |= ((t) << 28)) |
50 | 51 | ||
@@ -4226,4 +4227,19 @@ static int setup_hpet_msi(unsigned int irq, unsigned int id) | |||
4226 | return 0; | 4227 | return 0; |
4227 | } | 4228 | } |
4228 | 4229 | ||
4230 | struct irq_remap_ops amd_iommu_irq_ops = { | ||
4231 | .supported = amd_iommu_supported, | ||
4232 | .prepare = amd_iommu_prepare, | ||
4233 | .enable = amd_iommu_enable, | ||
4234 | .disable = amd_iommu_disable, | ||
4235 | .reenable = amd_iommu_reenable, | ||
4236 | .enable_faulting = amd_iommu_enable_faulting, | ||
4237 | .setup_ioapic_entry = setup_ioapic_entry, | ||
4238 | .set_affinity = set_affinity, | ||
4239 | .free_irq = free_irq, | ||
4240 | .compose_msi_msg = compose_msi_msg, | ||
4241 | .msi_alloc_irq = msi_alloc_irq, | ||
4242 | .msi_setup_irq = msi_setup_irq, | ||
4243 | .setup_hpet_msi = setup_hpet_msi, | ||
4244 | }; | ||
4229 | #endif | 4245 | #endif |