summaryrefslogtreecommitdiff
path: root/include/linux/swiotlb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/swiotlb.h')
-rw-r--r--include/linux/swiotlb.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
index bcef10e20ea4..7af2673b47ba 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -87,6 +87,11 @@ dma_addr_t swiotlb_map(struct device *dev, phys_addr_t phys,
* @for_alloc: %true if the pool is used for memory allocation
* @nareas: The area number in the pool.
* @area_nslabs: The slot number in the area.
+ * @total_used: The total number of slots in the pool that are currently used
+ * across all areas. Used only for calculating used_hiwater in
+ * debugfs.
+ * @used_hiwater: The high water mark for total_used. Used only for reporting
+ * in debugfs.
*/
struct io_tlb_mem {
phys_addr_t start;
@@ -102,6 +107,10 @@ struct io_tlb_mem {
unsigned int area_nslabs;
struct io_tlb_area *areas;
struct io_tlb_slot *slots;
+#ifdef CONFIG_DEBUG_FS
+ atomic_long_t total_used;
+ atomic_long_t used_hiwater;
+#endif
};
extern struct io_tlb_mem io_tlb_default_mem;
@@ -180,6 +189,4 @@ static inline bool is_swiotlb_for_alloc(struct device *dev)
}
#endif /* CONFIG_DMA_RESTRICTED_POOL */
-extern phys_addr_t swiotlb_unencrypted_base;
-
#endif /* __LINUX_SWIOTLB_H */