public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Sumitra Sharma <sumitraartsy@gmail.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Ira Weiny <ira.weiny@intel.com>, Fabio <fmdefrancesco@gmail.com>,
	Deepak R Varma <drv@mailo.com>,
	Thomas Hellstrom <thomas.hellstrom@intel.com>,
	Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag
Date: Wed, 14 Jun 2023 14:22:23 +0100	[thread overview]
Message-ID: <bebd57fc-7135-dc97-701e-54cb9c2955c0@linux.intel.com> (raw)
In-Reply-To: <20230614123556.GA381200@sumitra.com>


On 14/06/2023 13:35, Sumitra Sharma wrote:
> Pages allocated with GFP_KERNEL cannot come from Highmem.
> That is why there is no need to call kmap() on them.

Are you sure it is GFP_KERNEL backed and not tmpfs? I am not sure myself 
so let me copy Matt and Thomas if they happen to know off hand.

Regards,

Tvrtko

> Therefore, don't call kmap() on the page coming from
> vma_res->bi.pages using for_each_sgt_page() in
> i915_vma_coredump_create().
> 
> Use a plain page_address() to get the kernel address instead.
> 
> Signed-off-by: Sumitra Sharma <sumitraartsy@gmail.com>
> ---
>   drivers/gpu/drm/i915/i915_gpu_error.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index f020c0086fbc..6f51cb4fc55c 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -1164,9 +1164,8 @@ i915_vma_coredump_create(const struct intel_gt *gt,
>   
>   			drm_clflush_pages(&page, 1);
>   
> -			s = kmap(page);
> +			s = page_address(page);
>   			ret = compress_page(compress, s, dst, false);
> -			kunmap(page);
>   
>   			drm_clflush_pages(&page, 1);
>   

  reply	other threads:[~2023-06-14 13:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-14 12:35 [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag Sumitra Sharma
2023-06-14 13:22 ` Tvrtko Ursulin [this message]
2023-06-14 15:30   ` [Intel-gfx] " Thomas Hellström (Intel)
2023-06-17 18:26     ` Sumitra Sharma

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=bebd57fc-7135-dc97-701e-54cb9c2955c0@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=drv@mailo.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ira.weiny@intel.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew.auld@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sumitraartsy@gmail.com \
    --cc=thomas.hellstrom@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox