[PATCH] [2/2] x86_64: Fix CONFIG_IOMMU_DEBUG

From: Andi Kleen
Date: Mon Jul 31 2006 - 23:42:41 EST



From: Muli Ben-Yehuda <muli@xxxxxxxxxx>

If CONFIG_IOMMU_DEBUG is set force_iommu defaults to 1. In the case
where no HW IOMMU is present in the machine and we end up using nommu,
leaving force_iommu set to 1 causes dma_alloc_coherent to do the wrong
thing. Therefore, if we end up using nommu, make sure force_iommu is
0.

Signed-off-by: Muli Ben-Yehuda <muli@xxxxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxx>

---
arch/x86_64/kernel/pci-nommu.c | 2 ++
1 files changed, 2 insertions(+)

Index: linux/arch/x86_64/kernel/pci-nommu.c
===================================================================
--- linux.orig/arch/x86_64/kernel/pci-nommu.c
+++ linux/arch/x86_64/kernel/pci-nommu.c
@@ -92,5 +92,7 @@ void __init no_iommu_init(void)
{
if (dma_ops)
return;
+
+ force_iommu = 0; /* no HW IOMMU */
dma_ops = &nommu_dma_ops;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/