blob: 3ad22bbe80ebfcbc7239b19ea51ac9ce7ea706da [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
Lucas De Marchi9d7516b2022-01-31 08:59:25 -08009#include <linux/bug.h>
Siva Mullati67c430b2021-12-08 09:42:15 +053010#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 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
32int 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__ */