-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/i915: Skip remap_io_mapping() for non-x86 platforms
Only hw that supports mappable aperture would hit this path vm_fault_gtt/vm_fault_tmm, So we never hit this function remap_io_mapping() in discrete, So skip this code for non-x86 architectures. v2: use IS_ENABLED () instead of #if defined v3: move function prototypes from i915_drv.h to i915_mm.h v4: added kernel error message in stub function v5: fixed compilation warnings v6: checkpatch style Signed-off-by: Siva Mullati <siva.mullati@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211208041215.763098-1-siva.mullati@intel.com
- Loading branch information
Siva Mullati
authored and
Lucas De Marchi
committed
Dec 8, 2021
1 parent
c9ee950
commit 67c430b
Showing
4 changed files
with
52 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
/* | ||
* Copyright © 2021 Intel Corporation | ||
*/ | ||
|
||
#ifndef __I915_MM_H__ | ||
#define __I915_MM_H__ | ||
|
||
#include <linux/types.h> | ||
|
||
struct vm_area_struct; | ||
struct io_mapping; | ||
struct scatterlist; | ||
|
||
#if IS_ENABLED(CONFIG_X86) | ||
int remap_io_mapping(struct vm_area_struct *vma, | ||
unsigned long addr, unsigned long pfn, unsigned long size, | ||
struct io_mapping *iomap); | ||
#else | ||
static inline | ||
int remap_io_mapping(struct vm_area_struct *vma, | ||
unsigned long addr, unsigned long pfn, unsigned long size, | ||
struct io_mapping *iomap) | ||
{ | ||
pr_err("Architecture has no %s() and shouldn't be calling this function\n", __func__); | ||
WARN_ON_ONCE(1); | ||
return 0; | ||
} | ||
#endif | ||
|
||
int remap_io_sg(struct vm_area_struct *vma, | ||
unsigned long addr, unsigned long size, | ||
struct scatterlist *sgl, resource_size_t iobase); | ||
|
||
#endif /* __I915_MM_H__ */ |