[PATCH] x86_64: Fix CONFIG_IOMMU_DEBUG
authorMuli Ben-Yehuda <muli@il.ibm.com>
Wed, 2 Aug 2006 20:37:31 +0000 (22:37 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 3 Aug 2006 03:19:54 +0000 (20:19 -0700)
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@il.ibm.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/pci-nommu.c

index c4c3cc3..aad7609 100644 (file)
@@ -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;
 }