diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h index c2f0e37b..23a1bad7 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | |||
@@ -104,6 +104,14 @@ struct nvgpu_mem_sgl { | |||
104 | u64 length; | 104 | u64 length; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | /* | ||
108 | * Iterate over the SGL entries in an SGT. | ||
109 | */ | ||
110 | #define nvgpu_sgt_for_each_sgl(__sgl__, __sgt__) \ | ||
111 | for ((__sgl__) = (__sgt__)->sgl; \ | ||
112 | (__sgl__) != NULL; \ | ||
113 | (__sgl__) = nvgpu_sgt_get_next(__sgt__, __sgl__)) | ||
114 | |||
107 | struct nvgpu_mem { | 115 | struct nvgpu_mem { |
108 | /* | 116 | /* |
109 | * Populated for all nvgpu_mem structs - vidmem or system. | 117 | * Populated for all nvgpu_mem structs - vidmem or system. |