summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-05-22 12:27:53 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2009-05-28 18:17:13 +0200
commitfe16f088a88fb73161bba8784375c829f7e87b54 (patch)
tree6d581b943eb397d68bf241f5a3cffcf385e8f364 /arch/x86/kernel/amd_iommu.c
parentamd-iommu: remove amd_iommu_size kernel parameter (diff)
downloadlinux-fe16f088a88fb73161bba8784375c829f7e87b54.tar.xz
linux-fe16f088a88fb73161bba8784375c829f7e87b54.zip
amd-iommu: disable round-robin allocator for CONFIG_IOMMU_STRESS
Disabling the round-robin allocator results in reusing the same dma-addresses again very fast. This is a good test if the iotlb flushing is working correctly. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 31d56c36010a..543822b39a84 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -783,6 +783,11 @@ static unsigned long dma_ops_alloc_addresses(struct device *dev,
{
unsigned long address;
+#ifdef CONFIG_IOMMU_STRESS
+ dom->next_address = 0;
+ dom->need_flush = true;
+#endif
+
address = dma_ops_area_alloc(dev, dom, pages, align_mask,
dma_mask, dom->next_address);