From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbaLQEd4 (ORCPT ); Tue, 16 Dec 2014 23:33:56 -0500 Received: from mga01.intel.com ([192.55.52.88]:36957 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751267AbaLQEdz (ORCPT ); Tue, 16 Dec 2014 23:33:55 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="429971441" From: Jiang Liu To: Thomas Gleixner , Joerg Roedel , Benjamin Herrenschmidt , Ingo Molnar , "H. Peter Anvin" , Yinghai Lu , Borislav Petkov Cc: Joerg Roedel , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Jiang Liu Subject: [Patch v1 13/17] iommu/amd: Check for irq-remap support amd_iommu_prepare() Date: Wed, 17 Dec 2014 12:35:44 +0800 Message-Id: <1418790948-22804-14-git-send-email-jiang.liu@linux.intel.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1418790948-22804-1-git-send-email-jiang.liu@linux.intel.com> References: <1418790948-22804-1-git-send-email-jiang.liu@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Joerg Roedel 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 Signed-off-by: Jiang Liu --- drivers/iommu/amd_iommu_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index b0522f15730f..0039f87f48b8 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -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); } -- 1.7.10.4