projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d9cfed9
)
amd-iommu: disable round-robin allocator for CONFIG_IOMMU_STRESS
author
Joerg Roedel
<joerg.roedel@amd.com>
Fri, 22 May 2009 10:27:53 +0000
(12:27 +0200)
committer
Joerg Roedel
<joerg.roedel@amd.com>
Thu, 28 May 2009 16:17:13 +0000
(18:17 +0200)
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>
arch/x86/kernel/amd_iommu.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/amd_iommu.c
b/arch/x86/kernel/amd_iommu.c
index 31d56c36010ac59695b00d0729bd46904aac63a9..543822b39a846181f876a13cbfd4e6542b1e5d35 100644
(file)
--- 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);