diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-11-23 18:32:38 +0100 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-11-27 14:16:29 +0100 |
commit | 318afd41d2eca3224de3fd85a3b9a27a3010a98d (patch) | |
tree | 83434f1a39ee76536b4a987a25f4ff1153c41438 /arch/x86/kernel/amd_iommu.c | |
parent | 09b4280439ef6fdc55f1353a9135034336eb5d26 (diff) | |
download | op-kernel-dev-318afd41d2eca3224de3fd85a3b9a27a3010a98d.zip op-kernel-dev-318afd41d2eca3224de3fd85a3b9a27a3010a98d.tar.gz |
x86/amd-iommu: Make np-cache a global flag
The non-present cache flag was IOMMU local until now which
doesn't make sense. Make this a global flag so we can remove
the lase user of 'struct iommu' in the map/unmap path.
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 | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index a1bd99d..5ebd24e 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -131,12 +131,6 @@ static void amd_iommu_stats_init(void) #endif -/* returns !0 if the IOMMU is caching non-present entries in its TLB */ -static int iommu_has_npcache(struct amd_iommu *iommu) -{ - return iommu->cap & (1UL << IOMMU_CAP_NPCACHE); -} - /**************************************************************************** * * Interrupt handling functions @@ -1713,7 +1707,7 @@ retry: if (unlikely(dma_dom->need_flush && !amd_iommu_unmap_flush)) { iommu_flush_tlb(&dma_dom->domain); dma_dom->need_flush = false; - } else if (unlikely(iommu_has_npcache(iommu))) + } else if (unlikely(amd_iommu_np_cache)) iommu_flush_pages(&dma_dom->domain, address, size); out: |