xref: /kernel/linux/linux-5.10/include/xen/arm/page-coherent.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-5.10/include/xen/arm/
18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _XEN_ARM_PAGE_COHERENT_H
38c2ecf20Sopenharmony_ci#define _XEN_ARM_PAGE_COHERENT_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/dma-mapping.h>
68c2ecf20Sopenharmony_ci#include <asm/page.h>
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_cistatic inline void *xen_alloc_coherent_pages(struct device *hwdev, size_t size,
98c2ecf20Sopenharmony_ci		dma_addr_t *dma_handle, gfp_t flags, unsigned long attrs)
108c2ecf20Sopenharmony_ci{
118c2ecf20Sopenharmony_ci	return dma_direct_alloc(hwdev, size, dma_handle, flags, attrs);
128c2ecf20Sopenharmony_ci}
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_cistatic inline void xen_free_coherent_pages(struct device *hwdev, size_t size,
158c2ecf20Sopenharmony_ci		void *cpu_addr, dma_addr_t dma_handle, unsigned long attrs)
168c2ecf20Sopenharmony_ci{
178c2ecf20Sopenharmony_ci	dma_direct_free(hwdev, size, cpu_addr, dma_handle, attrs);
188c2ecf20Sopenharmony_ci}
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#endif /* _XEN_ARM_PAGE_COHERENT_H */
21

Indexes created Thu Nov 07 10:32:03 CST 2024