Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1158326
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Daniel J Blueman <daniel@numascale.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH -next] iommu: Fix build failure without INTEL_IOMMU |
| Date | Thu, 04 Jun 2015 10:10:02 +0200 |
| Message-ID | <pxynU-37f-9@gated-at.bofh.it> (permalink) |
| X-Original-To | Jiang Liu <jiang.liu@linux.intel.com> |
| Dkim-Signature | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=numascale.com; s=default; h=Message-Id:Date:Subject:Cc:To:From; bh=ItsLlnAb2YPEbEc8Un/whh6o7+e4E/OjEmX3NITuSL8=; b=ANqoLcIaWRUhEEW0dNUV4KU+c47DX/v+gUkeLWcpNTs/L4kvUX7+/zOmLc2ZH5OZQ18p2sm3E/klZXMNVRRaCaMA8maD83v0cN9/tK7pPvpkGUwaXXhVnGF2Wm78MiCt7nhl//S7Peu+K1bZ0JlgoWVNwkLxVOI+ba43XwgeELk=; |
| X-Mailer | git-send-email 2.1.4 |
| X-Antiabuse | This header was added to track abuse, please include it with any abuse report |
| X-Antiabuse | Primary Hostname - cpanel21.proisp.no |
| X-Antiabuse | Original Domain - vger.kernel.org |
| X-Antiabuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-Antiabuse | Sender Address Domain - numascale.com |
| X-Get-Message-Sender-Via | cpanel21.proisp.no: authenticated_id: daniel@numascale.com |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 71 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Daniel J Blueman <daniel@numascale.com>, Thomas Gleixner <tglx@linutronix.de>, Fenghua Yu <fenghua.yu@intel.com>, Steffen Persvold <sp@numascale.com>, LKML <linux-kernel@vger.kernel.org> |
| X-Original-Date | Thu, 4 Jun 2015 16:07:13 +0800 |
| X-Original-Message-ID | <1433405233-28180-1-git-send-email-daniel@numascale.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1158326 |
Show key headers only | View raw
Fix Intel IOMMU build failure in linux-next when CONFIG_INTEL_IOMMU is not enabled.
Signed-off-by: Daniel J Blueman <daniel@numascale.com>
---
drivers/iommu/intel_irq_remapping.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/iommu/intel_irq_remapping.c b/drivers/iommu/intel_irq_remapping.c
index 24f7a35..ec337e7 100644
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -146,8 +146,10 @@ static int modify_irte(struct irq_2_iommu *irq_iommu,
set_64bit(&irte->low, irte_modified->low);
set_64bit(&irte->high, irte_modified->high);
+#ifdef CONFIG_INTEL_IOMMU
if (iommu->pre_enabled_ir)
__iommu_update_old_irte(iommu, index);
+#endif
__iommu_flush_cache(iommu, irte, sizeof(*irte));
@@ -210,8 +212,10 @@ static int clear_entries(struct irq_2_iommu *irq_iommu)
bitmap_release_region(iommu->ir_table->bitmap, index,
irq_iommu->irte_mask);
+#ifdef CONFIG_INTEL_IOMMU
if (iommu->pre_enabled_ir)
__iommu_update_old_irte(iommu, -1);
+#endif
return qi_flush_iec(iommu, index, irq_iommu->irte_mask);
}
@@ -650,6 +654,7 @@ static int __init intel_enable_irq_remapping(void)
* Setup Interrupt-remapping for all the DRHD's now.
*/
for_each_iommu(iommu, drhd) {
+#ifdef CONFIG_INTEL_IOMMU
if (iommu->pre_enabled_ir) {
unsigned long long q;
@@ -660,6 +665,7 @@ static int __init intel_enable_irq_remapping(void)
INTR_REMAP_TABLE_ENTRIES*sizeof(struct irte));
__iommu_load_old_irte(iommu);
} else
+#endif
iommu_set_irq_remapping(iommu, eim);
setup = true;
@@ -1374,6 +1380,7 @@ static int __iommu_update_old_irte(struct intel_iommu *iommu, int index)
static void iommu_check_pre_ir_status(struct intel_iommu *iommu)
{
+#ifdef CONFIG_INTEL_IOMMU
u32 sts;
sts = readl(iommu->reg + DMAR_GSTS_REG);
@@ -1381,4 +1388,5 @@ static void iommu_check_pre_ir_status(struct intel_iommu *iommu)
pr_info("IR is enabled prior to OS.\n");
iommu->pre_enabled_ir = 1;
}
+#endif
}
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH -next] iommu: Fix build failure without INTEL_IOMMU Daniel J Blueman <daniel@numascale.com> - 2015-06-04 10:10 +0200 Re: [PATCH -next] iommu: Fix build failure without INTEL_IOMMU Jiang Liu <jiang.liu@linux.intel.com> - 2015-06-04 10:20 +0200
csiph-web