diff options
author | Joerg Roedel <joro@8bytes.org> | 2012-09-26 12:44:33 +0200 |
---|---|---|
committer | Joerg Roedel <joro@8bytes.org> | 2013-01-28 10:48:29 +0100 |
commit | 70733e0c7ed22177e2cfe660fa2a0e90f1f39126 (patch) | |
tree | c5e73c4c773dcfe8309f7b2734835f55495a9c15 /drivers/iommu | |
parent | 5ca72c4f7c412c2002363218901eba5516c476b1 (diff) | |
download | linux-3.10-70733e0c7ed22177e2cfe660fa2a0e90f1f39126.tar.gz linux-3.10-70733e0c7ed22177e2cfe660fa2a0e90f1f39126.tar.bz2 linux-3.10-70733e0c7ed22177e2cfe660fa2a0e90f1f39126.zip |
x86, apic: Move irq_remapping_enabled checks into IRQ-remapping code
Move the three easy to move checks in the x86' apic.c file
into the IRQ-remapping code.
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')
-rw-r--r-- | drivers/iommu/irq_remapping.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/iommu/irq_remapping.c b/drivers/iommu/irq_remapping.c index faf85d6e33f..19381b90e61 100644 --- a/drivers/iommu/irq_remapping.c +++ b/drivers/iommu/irq_remapping.c @@ -87,7 +87,9 @@ int __init irq_remapping_enable(void) void irq_remapping_disable(void) { - if (!remap_ops || !remap_ops->disable) + if (!irq_remapping_enabled || + !remap_ops || + !remap_ops->disable) return; remap_ops->disable(); @@ -95,7 +97,9 @@ void irq_remapping_disable(void) int irq_remapping_reenable(int mode) { - if (!remap_ops || !remap_ops->reenable) + if (!irq_remapping_enabled || + !remap_ops || + !remap_ops->reenable) return 0; return remap_ops->reenable(mode); @@ -103,6 +107,9 @@ int irq_remapping_reenable(int mode) int __init irq_remap_enable_fault_handling(void) { + if (!irq_remapping_enabled) + return 0; + if (!remap_ops || !remap_ops->enable_faulting) return -ENODEV; |