Skip to content

Commit

Permalink
amd-iommu: don't free dma adresses below 512MB with CONFIG_IOMMU_STRESS
Browse files Browse the repository at this point in the history
This will test the automatic aperture enlargement code. This is
important because only very few devices will ever trigger this code
path. So force it under CONFIG_IOMMU_STRESS.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
  • Loading branch information
Joerg Roedel committed May 28, 2009
1 parent f5e9705 commit 47bccd6
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 @@ -824,6 +824,11 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom,

BUG_ON(i >= APERTURE_MAX_RANGES || range == NULL);

#ifdef CONFIG_IOMMU_STRESS
if (i < 4)
return;
#endif

if (address >= dom->next_address)
dom->need_flush = true;

Expand Down

0 comments on commit 47bccd6

Please sign in to comment.