debug.h (cbecf716ca618fd44feda6bd9a64a8179d031fc5) | debug.h (c2bbf9d1e9ac7d4fdd503b190bc1ba8a6302bc49) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright (C) 2008 Advanced Micro Devices, Inc. 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 12extern void debug_dma_map_page(struct device *dev, struct page *page, 13 size_t offset, size_t size, | 1/* SPDX-License-Identifier: GPL-2.0-only */ 2/* 3 * Copyright (C) 2008 Advanced Micro Devices, Inc. 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 12extern void debug_dma_map_page(struct device *dev, struct page *page, 13 size_t offset, size_t size, |
14 int direction, dma_addr_t dma_addr); | 14 int direction, dma_addr_t dma_addr, 15 unsigned long attrs); |
15 16extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 17 size_t size, int direction); 18 19extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | 16 17extern void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 18 size_t size, int direction); 19 20extern void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, |
20 int nents, int mapped_ents, int direction); | 21 int nents, int mapped_ents, int direction, 22 unsigned long attrs); |
21 22extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, 23 int nelems, int dir); 24 25extern void debug_dma_alloc_coherent(struct device *dev, size_t size, | 23 24extern void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, 25 int nelems, int dir); 26 27extern void debug_dma_alloc_coherent(struct device *dev, size_t size, |
26 dma_addr_t dma_addr, void *virt); | 28 dma_addr_t dma_addr, void *virt, 29 unsigned long attrs); |
27 28extern void debug_dma_free_coherent(struct device *dev, size_t size, 29 void *virt, dma_addr_t addr); 30 31extern void debug_dma_map_resource(struct device *dev, phys_addr_t addr, 32 size_t size, int direction, | 30 31extern void debug_dma_free_coherent(struct device *dev, size_t size, 32 void *virt, dma_addr_t addr); 33 34extern void debug_dma_map_resource(struct device *dev, phys_addr_t addr, 35 size_t size, int direction, |
33 dma_addr_t dma_addr); | 36 dma_addr_t dma_addr, 37 unsigned long attrs); |
34 35extern void debug_dma_unmap_resource(struct device *dev, dma_addr_t dma_addr, 36 size_t size, int direction); 37 38extern void debug_dma_sync_single_for_cpu(struct device *dev, 39 dma_addr_t dma_handle, size_t size, 40 int direction); 41 --- 6 unchanged lines hidden (view full) --- 48 int nelems, int direction); 49 50extern void debug_dma_sync_sg_for_device(struct device *dev, 51 struct scatterlist *sg, 52 int nelems, int direction); 53#else /* CONFIG_DMA_API_DEBUG */ 54static inline void debug_dma_map_page(struct device *dev, struct page *page, 55 size_t offset, size_t size, | 38 39extern void debug_dma_unmap_resource(struct device *dev, dma_addr_t dma_addr, 40 size_t size, int direction); 41 42extern void debug_dma_sync_single_for_cpu(struct device *dev, 43 dma_addr_t dma_handle, size_t size, 44 int direction); 45 --- 6 unchanged lines hidden (view full) --- 52 int nelems, int direction); 53 54extern void debug_dma_sync_sg_for_device(struct device *dev, 55 struct scatterlist *sg, 56 int nelems, int direction); 57#else /* CONFIG_DMA_API_DEBUG */ 58static inline void debug_dma_map_page(struct device *dev, struct page *page, 59 size_t offset, size_t size, |
56 int direction, dma_addr_t dma_addr) | 60 int direction, dma_addr_t dma_addr, 61 unsigned long attrs) |
57{ 58} 59 60static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 61 size_t size, int direction) 62{ 63} 64 65static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | 62{ 63} 64 65static inline void debug_dma_unmap_page(struct device *dev, dma_addr_t addr, 66 size_t size, int direction) 67{ 68} 69 70static inline void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, |
66 int nents, int mapped_ents, int direction) | 71 int nents, int mapped_ents, int direction, 72 unsigned long attrs) |
67{ 68} 69 70static inline void debug_dma_unmap_sg(struct device *dev, 71 struct scatterlist *sglist, 72 int nelems, int dir) 73{ 74} 75 76static inline void debug_dma_alloc_coherent(struct device *dev, size_t size, | 73{ 74} 75 76static inline void debug_dma_unmap_sg(struct device *dev, 77 struct scatterlist *sglist, 78 int nelems, int dir) 79{ 80} 81 82static inline void debug_dma_alloc_coherent(struct device *dev, size_t size, |
77 dma_addr_t dma_addr, void *virt) | 83 dma_addr_t dma_addr, void *virt, 84 unsigned long attrs) |
78{ 79} 80 81static inline void debug_dma_free_coherent(struct device *dev, size_t size, 82 void *virt, dma_addr_t addr) 83{ 84} 85 86static inline void debug_dma_map_resource(struct device *dev, phys_addr_t addr, 87 size_t size, int direction, | 85{ 86} 87 88static inline void debug_dma_free_coherent(struct device *dev, size_t size, 89 void *virt, dma_addr_t addr) 90{ 91} 92 93static inline void debug_dma_map_resource(struct device *dev, phys_addr_t addr, 94 size_t size, int direction, |
88 dma_addr_t dma_addr) | 95 dma_addr_t dma_addr, 96 unsigned long attrs) |
89{ 90} 91 92static inline void debug_dma_unmap_resource(struct device *dev, 93 dma_addr_t dma_addr, size_t size, 94 int direction) 95{ 96} --- 26 unchanged lines hidden --- | 97{ 98} 99 100static inline void debug_dma_unmap_resource(struct device *dev, 101 dma_addr_t dma_addr, size_t size, 102 int direction) 103{ 104} --- 26 unchanged lines hidden --- |