blob: 76f1d53bdf34c2ad72cc267fc73d26aa089f7bb9 [file] [log] [blame]
Siva Mullati67c430b2021-12-08 09:42:15 +05301/* 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/types.h>
10
11struct vm_area_struct;
12struct io_mapping;
13struct scatterlist;
14
15#if IS_ENABLED(CONFIG_X86)
16int remap_io_mapping(struct vm_area_struct *vma,
17 unsigned long addr, unsigned long pfn, unsigned long size,
18 struct io_mapping *iomap);
19#else
20static inline
21int remap_io_mapping(struct vm_area_struct *vma,
22 unsigned long addr, unsigned long pfn, unsigned long size,
23 struct io_mapping *iomap)
24{
25 pr_err("Architecture has no %s() and shouldn't be calling this function\n", __func__);
26 WARN_ON_ONCE(1);
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__ */