public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	 Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	 Loic Molinari <loic.molinari@collabora.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/shmem-helper: Fix Map huge page mapping in fault handler
Date: Fri, 13 Mar 2026 08:32:52 -0300	[thread overview]
Message-ID: <abP0L_3O0yC2GdS5@fedora> (raw)
In-Reply-To: <20260312173227.7e9f0389@fedora>

On Thu, Mar 12, 2026 at 05:32:27PM +0100, Boris Brezillon wrote: 
> Do we really need to duplicate everything? Can't we rename
> drm_gem_shmem_fault() into drm_gem_shmem_any_fault() with a
> `bool try_pmd` passed as an argument, and then have
> drm_gem_shmem_[huge_]fault() as wrappers?
> 
> static vm_fault_t drm_gem_shmem_huge_fault(struct vm_fault *vmf,
> 					   unsigned int order)
> {
> 	if (order != PMD_ORDER)
> 		return VM_FAULT_FALLBACK;
> 
> 	return drm_gem_shmem_any_fault(vmf, true);
> }
> 
> static vm_fault_t drm_gem_shmem_fault(struct vm_fault *vmf)
> {
> 	return drm_gem_shmem_any_fault(vmf, false);
> }
> 

Ack.

> > @@ -643,6 +667,9 @@ static void drm_gem_shmem_vm_close(struct vm_area_struct *vma)
> >  
> >  const struct vm_operations_struct drm_gem_shmem_vm_ops = {
> >  	.fault = drm_gem_shmem_fault,
> > +	#ifdef CONFIG_ARCH_SUPPORTS_HUGE_PFNMAP
> > +	.huge_fault = drm_gem_shmem_huge_fault,
> > +	#endif
> 
> Let's keep the #ifdef unindented:
> 
> #ifdef CONFIG_ARCH_SUPPORTS_HUGE_PFNMAP
> 	.huge_fault = drm_gem_shmem_huge_fault,
> #endif
> 
> >  	.open = drm_gem_shmem_vm_open,
> >  	.close = drm_gem_shmem_vm_close,
> >  };
>

Ack.
I will send a v2 addressing these issues.
Thanks.


  reply	other threads:[~2026-03-13 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 15:50 [PATCH] drm/shmem-helper: Fix Map huge page mapping in fault handler Pedro Demarchi Gomes
2026-03-12 16:32 ` Boris Brezillon
2026-03-13 11:32   ` Pedro Demarchi Gomes [this message]
2026-03-14 19:05 ` kernel test robot

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=abP0L_3O0yC2GdS5@fedora \
    --to=pedrodemargomes@gmail.com \
    --cc=airlied@gmail.com \
    --cc=boris.brezillon@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.molinari@collabora.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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