aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intr_remapping.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2012-03-30 14:47:01 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2012-05-07 08:34:59 -0400
commit4f3d8b67ad3090f9fb72f8235d21cde53cd24b79 (patch)
treec6408bbae796a1aec8c0d8ef735ee2f159358e2c /drivers/iommu/intr_remapping.c
parent736baef4472d00574089f295bc759ac002b9558c (diff)
iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops
Convert these calls too: * Disable of remapping hardware * Reenable of remapping hardware * Enable fault handling With that all of arch/x86/kernel/apic/apic.c is converted to use the generic intr-remapping interface. 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.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/iommu/intr_remapping.c b/drivers/iommu/intr_remapping.c
index 670c69a80afd..9aabed7c0320 100644
--- a/drivers/iommu/intr_remapping.c
+++ b/drivers/iommu/intr_remapping.c
@@ -74,3 +74,27 @@ int __init intr_hardware_enable(void)
74 74
75 return remap_ops->hardware_enable(); 75 return remap_ops->hardware_enable();
76} 76}
77
78void intr_hardware_disable(void)
79{
80 if (!remap_ops || !remap_ops->hardware_disable)
81 return;
82
83 remap_ops->hardware_disable();
84}
85
86int intr_hardware_reenable(int mode)
87{
88 if (!remap_ops || !remap_ops->hardware_reenable)
89 return 0;
90
91 return remap_ops->hardware_reenable(mode);
92}
93
94int __init intr_enable_fault_handling(void)
95{
96 if (!remap_ops || !remap_ops->enable_faulting)
97 return -ENODEV;
98
99 return remap_ops->enable_faulting();
100}