[Intel-gfx] [PATCH] drm/i915: Skip remap_io_mapping() for non-x86 platforms
Jani Nikula
jani.nikula at intel.com
Fri Nov 12 22:18:10 UTC 2021
On Fri, 12 Nov 2021, Mullati Siva <siva.mullati at intel.com> wrote:
> The _PAGE_CACHE_MASK macro is not defined in non-x86
> architectures and it's been used in remap_io_mapping().
> Only hw that supports mappable aperture would hit this path
> remap_io_mapping(), So skip this code for non-x86 architectures.
Patch changelog goes here.
> Signed-off-by: Mullati Siva <siva.mullati at intel.com>
> ---
> drivers/gpu/drm/i915/i915_mm.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_mm.c b/drivers/gpu/drm/i915/i915_mm.c
> index 666808cb3a32..d76feeaf3fd1 100644
> --- a/drivers/gpu/drm/i915/i915_mm.c
> +++ b/drivers/gpu/drm/i915/i915_mm.c
> @@ -91,6 +91,7 @@ int remap_io_mapping(struct vm_area_struct *vma,
> unsigned long addr, unsigned long pfn, unsigned long size,
> struct io_mapping *iomap)
> {
> +#if IS_ENABLED(CONFIG_X86)
My feedback to the previous version was:
Please don't add conditional compilation within functions.
I mean it.
> struct remap_pfn r;
> int err;
>
> @@ -108,6 +109,7 @@ int remap_io_mapping(struct vm_area_struct *vma,
> zap_vma_ptes(vma, addr, (r.pfn - pfn) << PAGE_SHIFT);
> return err;
> }
> +#endif
>
> return 0;
> }
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list