From: Muli Ben-Yehuda Date: Wed, 2 Aug 2006 20:37:31 +0000 (+0200) Subject: [PATCH] x86_64: Fix CONFIG_IOMMU_DEBUG X-Git-Tag: v2.6.18-rc4~68 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a166222cde740b34d97fe49dca70348197f4534e;p=linux-2.6-omap-h63xx.git [PATCH] x86_64: Fix CONFIG_IOMMU_DEBUG 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 Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/pci-nommu.c b/arch/x86_64/kernel/pci-nommu.c index c4c3cc36ac5..aad7609d8e9 100644 --- a/arch/x86_64/kernel/pci-nommu.c +++ b/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; }