Skip to content

Commit

Permalink
amd-iommu: disable round-robin allocator for CONFIG_IOMMU_STRESS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed May 28, 2009
1 parent d9cfed9 commit fe16f08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit fe16f08

Please sign in to comment.