drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / arch / riscv / include / asm / dma-noncoherent.h
blob312cfa0858fbe92ed9215ae43dfa4ba1eb106269
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2023 Renesas Electronics Corp.
4 */
6 #ifndef __ASM_DMA_NONCOHERENT_H
7 #define __ASM_DMA_NONCOHERENT_H
9 #include <linux/dma-direct.h>
12 * struct riscv_nonstd_cache_ops - Structure for non-standard CMO function pointers
14 * @wback: Function pointer for cache writeback
15 * @inv: Function pointer for invalidating cache
16 * @wback_inv: Function pointer for flushing the cache (writeback + invalidating)
18 struct riscv_nonstd_cache_ops {
19 void (*wback)(phys_addr_t paddr, size_t size);
20 void (*inv)(phys_addr_t paddr, size_t size);
21 void (*wback_inv)(phys_addr_t paddr, size_t size);
24 extern struct riscv_nonstd_cache_ops noncoherent_cache_ops;
26 void riscv_noncoherent_register_cache_ops(const struct riscv_nonstd_cache_ops *ops);
28 #endif /* __ASM_DMA_NONCOHERENT_H */