Siva Mullati | 67c430b | 2021-12-08 09:42:15 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: MIT */ |
| 2 | /* |
| 3 | * Copyright © 2021 Intel Corporation |
| 4 | */ |
| 5 | |
| 6 | #ifndef __I915_MM_H__ |
| 7 | #define __I915_MM_H__ |
| 8 | |
Lucas De Marchi | 9d7516b | 2022-01-31 08:59:25 -0800 | [diff] [blame] | 9 | #include <linux/bug.h> |
Siva Mullati | 67c430b | 2021-12-08 09:42:15 +0530 | [diff] [blame] | 10 | #include <linux/types.h> |
| 11 | |
| 12 | struct vm_area_struct; |
| 13 | struct io_mapping; |
| 14 | struct scatterlist; |
| 15 | |
| 16 | #if IS_ENABLED(CONFIG_X86) |
| 17 | int 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 |
| 21 | static inline |
| 22 | int 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 | pr_err("Architecture has no %s() and shouldn't be calling this function\n", __func__); |
| 27 | WARN_ON_ONCE(1); |
| 28 | return 0; |
| 29 | } |
| 30 | #endif |
| 31 | |
| 32 | int remap_io_sg(struct vm_area_struct *vma, |
| 33 | unsigned long addr, unsigned long size, |
| 34 | struct scatterlist *sgl, resource_size_t iobase); |
| 35 | |
| 36 | #endif /* __I915_MM_H__ */ |