diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-22 06:40:54 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-28 12:18:33 -0400 |
commit | 47bccd6bb2b866449d3ecf2ba350ac1c7473b2b8 (patch) | |
tree | 966614593b32453d4d75db4c2df1e9f4d79d144b /arch/x86/kernel/amd_iommu.c | |
parent | f5e9705c6429d24dee832b2edd7f4848d432ea03 (diff) |
amd-iommu: don't free dma adresses below 512MB with CONFIG_IOMMU_STRESS
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>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 33434c497a6a..04ff5ec4ac0e 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -824,6 +824,11 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, | |||
824 | 824 | ||
825 | BUG_ON(i >= APERTURE_MAX_RANGES || range == NULL); | 825 | BUG_ON(i >= APERTURE_MAX_RANGES || range == NULL); |
826 | 826 | ||
827 | #ifdef CONFIG_IOMMU_STRESS | ||
828 | if (i < 4) | ||
829 | return; | ||
830 | #endif | ||
831 | |||
827 | if (address >= dom->next_address) | 832 | if (address >= dom->next_address) |
828 | dom->need_flush = true; | 833 | dom->need_flush = true; |
829 | 834 | ||