iommu/amd: Check for irq-remap support amd_iommu_prepare()
authorJoerg Roedel <jroedel@suse.de>
Wed, 7 Jan 2015 07:31:39 +0000 (15:31 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 15 Jan 2015 10:24:23 +0000 (11:24 +0100)
This allows to get rid of the irq_remapping_supported() function and
all its call-backs into the Intel and AMD IOMMU drivers.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Tested-by: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: iommu@lists.linux-foundation.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Link: http://lkml.kernel.org/r/1420615903-28253-13-git-send-email-jiang.liu@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/iommu/amd_iommu_init.c

index b0522f15730fbbc0b6dda1aa1a100cf9af6b426d..0039f87f48b822a04a5e1c5a5ea1c91e34756ab3 100644 (file)
@@ -2123,6 +2123,9 @@ static int __init iommu_go_to_state(enum iommu_init_state state)
 #ifdef CONFIG_IRQ_REMAP
 int __init amd_iommu_prepare(void)
 {
+       if (!amd_iommu_irq_remap)
+               return -1;
+
        return iommu_go_to_state(IOMMU_ACPI_FINISHED);
 }