diff options
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 71646c81421a..859ca741745b 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -67,6 +67,7 @@ static struct dma_ops_domain *find_protection_domain(u16 devid); | |||
67 | DECLARE_STATS_COUNTER(compl_wait); | 67 | DECLARE_STATS_COUNTER(compl_wait); |
68 | DECLARE_STATS_COUNTER(cnt_map_single); | 68 | DECLARE_STATS_COUNTER(cnt_map_single); |
69 | DECLARE_STATS_COUNTER(cnt_unmap_single); | 69 | DECLARE_STATS_COUNTER(cnt_unmap_single); |
70 | DECLARE_STATS_COUNTER(cnt_map_sg); | ||
70 | 71 | ||
71 | static struct dentry *stats_dir; | 72 | static struct dentry *stats_dir; |
72 | static struct dentry *de_isolate; | 73 | static struct dentry *de_isolate; |
@@ -96,6 +97,7 @@ static void amd_iommu_stats_init(void) | |||
96 | amd_iommu_stats_add(&compl_wait); | 97 | amd_iommu_stats_add(&compl_wait); |
97 | amd_iommu_stats_add(&cnt_map_single); | 98 | amd_iommu_stats_add(&cnt_map_single); |
98 | amd_iommu_stats_add(&cnt_unmap_single); | 99 | amd_iommu_stats_add(&cnt_unmap_single); |
100 | amd_iommu_stats_add(&cnt_map_sg); | ||
99 | } | 101 | } |
100 | 102 | ||
101 | #endif | 103 | #endif |
@@ -1377,6 +1379,8 @@ static int map_sg(struct device *dev, struct scatterlist *sglist, | |||
1377 | int mapped_elems = 0; | 1379 | int mapped_elems = 0; |
1378 | u64 dma_mask; | 1380 | u64 dma_mask; |
1379 | 1381 | ||
1382 | INC_STATS_COUNTER(cnt_map_sg); | ||
1383 | |||
1380 | if (!check_device(dev)) | 1384 | if (!check_device(dev)) |
1381 | return 0; | 1385 | return 0; |
1382 | 1386 | ||