Linux Audio

Check our new training course

Loading...
v4.10.11
 
 1#ifndef DMA_H
 2#define DMA_H
 3
 4#include <asm/glue-cache.h>
 5
 6#ifndef MULTI_CACHE
 7#define dmac_map_area			__glue(_CACHE,_dma_map_area)
 8#define dmac_unmap_area 		__glue(_CACHE,_dma_unmap_area)
 9
10/*
11 * These are private to the dma-mapping API.  Do not use directly.
12 * Their sole purpose is to ensure that data held in the cache
13 * is visible to DMA, or data written by DMA to system memory is
14 * visible to the CPU.
15 */
16extern void dmac_map_area(const void *, size_t, int);
17extern void dmac_unmap_area(const void *, size_t, int);
18
19#else
20
21/*
22 * These are private to the dma-mapping API.  Do not use directly.
23 * Their sole purpose is to ensure that data held in the cache
24 * is visible to DMA, or data written by DMA to system memory is
25 * visible to the CPU.
26 */
27#define dmac_map_area			cpu_cache.dma_map_area
28#define dmac_unmap_area 		cpu_cache.dma_unmap_area
29
30#endif
31
32#endif
v5.9
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef DMA_H
 3#define DMA_H
 4
 5#include <asm/glue-cache.h>
 6
 7#ifndef MULTI_CACHE
 8#define dmac_map_area			__glue(_CACHE,_dma_map_area)
 9#define dmac_unmap_area 		__glue(_CACHE,_dma_unmap_area)
10
11/*
12 * These are private to the dma-mapping API.  Do not use directly.
13 * Their sole purpose is to ensure that data held in the cache
14 * is visible to DMA, or data written by DMA to system memory is
15 * visible to the CPU.
16 */
17extern void dmac_map_area(const void *, size_t, int);
18extern void dmac_unmap_area(const void *, size_t, int);
19
20#else
21
22/*
23 * These are private to the dma-mapping API.  Do not use directly.
24 * Their sole purpose is to ensure that data held in the cache
25 * is visible to DMA, or data written by DMA to system memory is
26 * visible to the CPU.
27 */
28#define dmac_map_area			cpu_cache.dma_map_area
29#define dmac_unmap_area 		cpu_cache.dma_unmap_area
30
31#endif
32
33#endif