public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>,
	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>,
	Boris Brezillon <bbrezillon@kernel.org>,
	Loic Molinari <loic.molinari@collabora.com>
Cc: oe-kbuild-all@lists.linux.dev, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org,
	Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
Subject: Re: [PATCH] drm/shmem-helper: Fix Map huge page mapping in fault handler
Date: Sun, 15 Mar 2026 03:05:34 +0800	[thread overview]
Message-ID: <202603150233.7ZFf6Fsm-lkp@intel.com> (raw)
In-Reply-To: <20260312155027.1682606-1-pedrodemargomes@gmail.com>

Hi Pedro,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v7.0-rc3]
[cannot apply to drm-misc/drm-misc-next next-20260311]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Pedro-Demarchi-Gomes/drm-shmem-helper-Fix-Map-huge-page-mapping-in-fault-handler/20260314-094433
base:   linus/master
patch link:    https://lore.kernel.org/r/20260312155027.1682606-1-pedrodemargomes%40gmail.com
patch subject: [PATCH] drm/shmem-helper: Fix Map huge page mapping in fault handler
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20260315/202603150233.7ZFf6Fsm-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260315/202603150233.7ZFf6Fsm-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603150233.7ZFf6Fsm-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/drm_gem_shmem_helper.c:554:19: warning: 'drm_gem_shmem_huge_fault' defined but not used [-Wunused-function]
     554 | static vm_fault_t drm_gem_shmem_huge_fault(struct vm_fault *vmf,
         |                   ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/drm_gem_shmem_huge_fault +554 drivers/gpu/drm/drm_gem_shmem_helper.c

   552	
   553	
 > 554	static vm_fault_t drm_gem_shmem_huge_fault(struct vm_fault *vmf,
   555						   unsigned int order)
   556	{
   557		struct vm_area_struct *vma = vmf->vma;
   558		struct drm_gem_object *obj = vma->vm_private_data;
   559		struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
   560		loff_t num_pages = obj->size >> PAGE_SHIFT;
   561		vm_fault_t ret = VM_FAULT_FALLBACK;
   562		struct page **pages = shmem->pages;
   563		pgoff_t page_offset;
   564		unsigned long pfn;
   565		unsigned long paddr;
   566		bool aligned;
   567		struct page *page;
   568	
   569		if (order != PMD_ORDER)
   570			goto out_unlocked;
   571	
   572		/* Offset to faulty address in the VMA. */
   573		page_offset = vmf->pgoff - vma->vm_pgoff;
   574	
   575		dma_resv_lock(shmem->base.resv, NULL);
   576	
   577		if (page_offset >= num_pages ||
   578		    drm_WARN_ON_ONCE(obj->dev, !shmem->pages) ||
   579		    shmem->madv < 0) {
   580			ret = VM_FAULT_SIGBUS;
   581			goto out;
   582		}
   583	
   584		page = pages[page_offset];
   585		pfn = page_to_pfn(page);
   586		paddr = pfn << PAGE_SHIFT;
   587		aligned = (vmf->address & ~PMD_MASK) == (paddr & ~PMD_MASK);
   588	
   589		if (aligned &&
   590		    folio_test_pmd_mappable(page_folio(page))) {
   591			pfn &= PMD_MASK >> PAGE_SHIFT;
   592			ret = vmf_insert_pfn_pmd(vmf, pfn, false);
   593		}
   594	
   595	 out:
   596		dma_resv_unlock(shmem->base.resv);
   597	
   598	 out_unlocked:
   599		return ret;
   600	}
   601	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2026-03-14 19:06 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
2026-03-14 19:05 ` kernel test robot [this message]

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=202603150233.7ZFf6Fsm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@gmail.com \
    --cc=bbrezillon@kernel.org \
    --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=oe-kbuild-all@lists.linux.dev \
    --cc=pedrodemargomes@gmail.com \
    --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