Skip to content

Commit

Permalink
[PATCH] x86_64: Fix CONFIG_IOMMU_DEBUG
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Muli Ben-Yehuda authored and Linus Torvalds committed Aug 3, 2006
1 parent 2699500 commit a166222
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86_64/kernel/pci-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit a166222

Please sign in to comment.