1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright �� 2021 Intel Corporation
4 */
5
6#ifndef __I915_MM_H__
7#define __I915_MM_H__
8
9#include <linux/bug.h>
10#include <linux/types.h>
11
12struct vm_area_struct;
13struct io_mapping;
14struct scatterlist;
15
16#if IS_ENABLED(CONFIG_X86)
17int remap_io_mapping(struct vm_area_struct *vma,
18		     unsigned long addr, unsigned long pfn, unsigned long size,
19		     struct io_mapping *iomap);
20#else
21static inline
22int remap_io_mapping(struct vm_area_struct *vma,
23		     unsigned long addr, unsigned long pfn, unsigned long size,
24		     struct io_mapping *iomap)
25{
26	WARN_ONCE(1, "Architecture has no drm_cache.c support\n");
27	return 0;
28}
29#endif
30
31int remap_io_sg(struct vm_area_struct *vma,
32		unsigned long addr, unsigned long size,
33		struct scatterlist *sgl, resource_size_t iobase);
34
35#endif /* __I915_MM_H__ */
36