AMD IOMMU: add stats counter for cross-page request

Impact: see number of requests for more than one page in debugfs

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

+5
+5
arch/x86/kernel/amd_iommu.c
··· 71 71 DECLARE_STATS_COUNTER(cnt_unmap_sg); 72 72 DECLARE_STATS_COUNTER(cnt_alloc_coherent); 73 73 DECLARE_STATS_COUNTER(cnt_free_coherent); 74 + DECLARE_STATS_COUNTER(cross_page); 74 75 75 76 static struct dentry *stats_dir; 76 77 static struct dentry *de_isolate; ··· 105 104 amd_iommu_stats_add(&cnt_unmap_sg); 106 105 amd_iommu_stats_add(&cnt_alloc_coherent); 107 106 amd_iommu_stats_add(&cnt_free_coherent); 107 + amd_iommu_stats_add(&cross_page); 108 108 } 109 109 110 110 #endif ··· 1218 1216 1219 1217 pages = iommu_num_pages(paddr, size, PAGE_SIZE); 1220 1218 paddr &= PAGE_MASK; 1219 + 1220 + if (pages > 1) 1221 + INC_STATS_COUNTER(cross_page); 1221 1222 1222 1223 if (align) 1223 1224 align_mask = (1UL << get_order(size)) - 1;