aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-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);
75DECLARE_STATS_COUNTER(domain_flush_single); 75DECLARE_STATS_COUNTER(domain_flush_single);
76DECLARE_STATS_COUNTER(domain_flush_all); 76DECLARE_STATS_COUNTER(domain_flush_all);
77DECLARE_STATS_COUNTER(alloced_io_mem); 77DECLARE_STATS_COUNTER(alloced_io_mem);
78DECLARE_STATS_COUNTER(total_map_requests);
78 79
79static struct dentry *stats_dir; 80static struct dentry *stats_dir;
80static struct dentry *de_isolate; 81static struct dentry *de_isolate;
@@ -112,6 +113,7 @@ static void amd_iommu_stats_init(void)
112 amd_iommu_stats_add(&domain_flush_single); 113 amd_iommu_stats_add(&domain_flush_single);
113 amd_iommu_stats_add(&domain_flush_all); 114 amd_iommu_stats_add(&domain_flush_all);
114 amd_iommu_stats_add(&alloced_io_mem); 115 amd_iommu_stats_add(&alloced_io_mem);
116 amd_iommu_stats_add(&total_map_requests);
115} 117}
116 118
117#endif 119#endif
@@ -1229,6 +1231,8 @@ static dma_addr_t __map_single(struct device *dev,
1229 pages = iommu_num_pages(paddr, size, PAGE_SIZE); 1231 pages = iommu_num_pages(paddr, size, PAGE_SIZE);
1230 paddr &= PAGE_MASK; 1232 paddr &= PAGE_MASK;
1231 1233
1234 INC_STATS_COUNTER(total_map_requests);
1235
1232 if (pages > 1) 1236 if (pages > 1)
1233 INC_STATS_COUNTER(cross_page); 1237 INC_STATS_COUNTER(cross_page);
1234 1238