1 /* SPDX-License-Identifier: GPL-2.0-only */ 1 2 /* 3 * Copyright (C) 2008 Advanced Micro Devices, 4 * 5 * Author: Joerg Roedel <joerg.roedel@amd.com> 6 */ 7 8 #ifndef _KERNEL_DMA_DEBUG_H 9 #define _KERNEL_DMA_DEBUG_H 10 11 #ifdef CONFIG_DMA_API_DEBUG 12 extern void debug_dma_map_page(struct device * 13 size_t offset, 14 int direction, 15 unsigned long a 16 17 extern void debug_dma_unmap_page(struct device 18 size_t size, 19 20 extern void debug_dma_map_sg(struct device *de 21 int nents, int ma 22 unsigned long att 23 24 extern void debug_dma_unmap_sg(struct device * 25 int nelems, int 26 27 extern void debug_dma_alloc_coherent(struct de 28 dma_addr_ 29 unsigned 30 31 extern void debug_dma_free_coherent(struct dev 32 void *virt 33 34 extern void debug_dma_map_resource(struct devi 35 size_t size 36 dma_addr_t 37 unsigned lo 38 39 extern void debug_dma_unmap_resource(struct de 40 size_t si 41 42 extern void debug_dma_sync_single_for_cpu(stru 43 dma_ 44 int 45 46 extern void debug_dma_sync_single_for_device(s 47 d 48 s 49 50 extern void debug_dma_sync_sg_for_cpu(struct d 51 struct s 52 int nele 53 54 extern void debug_dma_sync_sg_for_device(struc 55 struc 56 int n 57 #else /* CONFIG_DMA_API_DEBUG */ 58 static inline void debug_dma_map_page(struct d 59 size_t o 60 int dire 61 unsigned 62 { 63 } 64 65 static inline void debug_dma_unmap_page(struct 66 size_t 67 { 68 } 69 70 static inline void debug_dma_map_sg(struct dev 71 int nents, 72 unsigned l 73 { 74 } 75 76 static inline void debug_dma_unmap_sg(struct d 77 struct s 78 int nele 79 { 80 } 81 82 static inline void debug_dma_alloc_coherent(st 83 dm 84 un 85 { 86 } 87 88 static inline void debug_dma_free_coherent(str 89 voi 90 { 91 } 92 93 static inline void debug_dma_map_resource(stru 94 size 95 dma_ 96 unsi 97 { 98 } 99 100 static inline void debug_dma_unmap_resource(st 101 dm 102 in 103 { 104 } 105 106 static inline void debug_dma_sync_single_for_c 107 108 109 { 110 } 111 112 static inline void debug_dma_sync_single_for_d 113 114 115 { 116 } 117 118 static inline void debug_dma_sync_sg_for_cpu(s 119 s 120 i 121 { 122 } 123 124 static inline void debug_dma_sync_sg_for_devic 125 126 127 { 128 } 129 #endif /* CONFIG_DMA_API_DEBUG */ 130 #endif /* _KERNEL_DMA_DEBUG_H */ 131
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.