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
12 #ifdef __linux__
13 struct vm_area_struct;
14 #endif
15 struct io_mapping;
16 struct scatterlist;
17
18 #ifdef notyet
19 #if IS_ENABLED(CONFIG_X86)
20 int remap_io_mapping(struct vm_area_struct *vma,
21 unsigned long addr, unsigned long pfn, unsigned long size,
22 struct io_mapping *iomap);
23 #else
24 static inline
remap_io_mapping(struct vm_area_struct * vma,unsigned long addr,unsigned long pfn,unsigned long size,struct io_mapping * iomap)25 int remap_io_mapping(struct vm_area_struct *vma,
26 unsigned long addr, unsigned long pfn, unsigned long size,
27 struct io_mapping *iomap)
28 {
29 WARN_ONCE(1, "Architecture has no drm_cache.c support\n");
30 return 0;
31 }
32 #endif
33 #endif /* notyet */
34
35 #ifdef __linux__
36 int remap_io_sg(struct vm_area_struct *vma,
37 unsigned long addr, unsigned long size,
38 struct scatterlist *sgl, resource_size_t iobase);
39 #endif
40
41 #endif /* __I915_MM_H__ */
42