diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-12 09:09:48 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 08:11:59 -0500 |
commit | d03f067a9d0a1cc09529427af9a15e15d32ba1de (patch) | |
tree | 6d09e8029cd35ed8bf769cb8af662fbac81a1a30 /arch/x86/kernel/amd_iommu.c | |
parent | 146a6917fc30616401a090f55cff2b855ee5b2ab (diff) |
AMD IOMMU: add stats counter for map_sg requests
Impact: see number of map_sg requests in debugfs
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 | 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 | ||