All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Mullati Siva <siva.mullati@intel.com>,
	intel-gfx@lists.freedesktop.org, siva.mullati@intel.com
Cc: lucas.demarchi@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Skip remap_io_mapping() for non-x86 platforms
Date: Fri, 12 Nov 2021 16:09:51 +0200	[thread overview]
Message-ID: <87tugh31ow.fsf@intel.com> (raw)
In-Reply-To: <20211112132456.19800-1-siva.mullati@intel.com>

On Fri, 12 Nov 2021, Mullati Siva <siva.mullati@intel.com> wrote:
> From: "Mullati, Siva" <siva.mullati@intel.com>
>
> 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.
>
> Signed-off-by: Mullati, Siva <siva.mullati@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..5e2a1868b957 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 defined(CONFIG_X86)

Please don't add conditional compilation within functions. Please use
#if IS_ENABLED() instead of #if defined or #ifdef.

BR,
Jani.

>  	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

  parent reply	other threads:[~2021-11-12 14:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-12 13:24 [Intel-gfx] [PATCH] drm/i915: Skip remap_io_mapping() for non-x86 platforms Mullati Siva
2021-11-12 13:51 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork
2021-11-12 14:09 ` Jani Nikula [this message]
2021-11-12 14:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-12 15:37 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-11-12 17:18 [Intel-gfx] [PATCH] " Mullati Siva
2021-11-12 22:18 ` Jani Nikula
2021-11-13 17:34   ` Lucas De Marchi
2021-11-16 19:24     ` Matthew Auld
2021-11-22 12:31 Mullati Siva
2021-11-30 19:17 ` Lucas De Marchi
2021-12-01  9:04   ` Jani Nikula
2021-12-01 11:32 Mullati Siva
2021-12-07 16:49 Mullati Siva
2021-12-08  4:12 Mullati Siva
2021-12-08 21:26 ` Lucas De Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tugh31ow.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=siva.mullati@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.