summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-12-12 16:13:04 +0100
committerJoerg Roedel <joerg.roedel@amd.com>2009-01-03 14:12:00 +0100
commit8ecaf8f19f0f0627d6ac6d69ed9472e7d307f35b (patch)
tree1b2ff78164c6fa11cd2a66060d8bfc1ff2d315f2
parent5774f7c5fef2526bfa58eab628fbe91dce5e07b1 (diff)
AMD IOMMU: add statistics about total number of map requests
Impact: see total number of map requests in debugfs Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
-rw-r--r--arch/x86/kernel/amd_iommu.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 69f367b033a2..0c504b207bf9 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -75,6 +75,7 @@ DECLARE_STATS_COUNTER(cross_page);
DECLARE_STATS_COUNTER(domain_flush_single);
DECLARE_STATS_COUNTER(domain_flush_all);
DECLARE_STATS_COUNTER(alloced_io_mem);
+DECLARE_STATS_COUNTER(total_map_requests);
static struct dentry *stats_dir;
static struct dentry *de_isolate;
@@ -112,6 +113,7 @@ static void amd_iommu_stats_init(void)
amd_iommu_stats_add(&domain_flush_single);
amd_iommu_stats_add(&domain_flush_all);
amd_iommu_stats_add(&alloced_io_mem);
+ amd_iommu_stats_add(&total_map_requests);
}
#endif
@@ -1229,6 +1231,8 @@ static dma_addr_t __map_single(struct device *dev,
pages = iommu_num_pages(paddr, size, PAGE_SIZE);
paddr &= PAGE_MASK;
+ INC_STATS_COUNTER(total_map_requests);
+
if (pages > 1)
INC_STATS_COUNTER(cross_page);