All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android-mainline-desktop 214/214] drivers/gpu/drm/drm_gem_shmem_helper.c:584:24: error: use of undeclared identifier 'PMD_SHIFT'
Date: Sat, 16 May 2026 18:53:01 +0800	[thread overview]
Message-ID: <202605161857.dxGE4AQU-lkp@intel.com> (raw)

Hi Carlos,

First bad commit (maybe != root cause):

tree:   https://android.googlesource.com/kernel/common android-mainline-desktop
head:   25ad575177d0d2370faad841ed596e791ba30711
commit: 0cc6f52b2aab23f59b9b92188194b0847105ceee [214/214] Merge 0bcb517f0a70 ("Merge tag 'mm-hotfixes-stable-2026-03-28-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm") into android-mainline
config: arm-randconfig-r123-20260516 (https://download.01.org/0day-ci/archive/20260516/202605161857.dxGE4AQU-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260516/202605161857.dxGE4AQU-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/202605161857.dxGE4AQU-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/drm_gem_shmem_helper.c:584:24: error: use of undeclared identifier 'PMD_SHIFT'
     584 |         if (order && order != PMD_ORDER)
         |                               ^~~~~~~~~
   include/linux/pgtable.h:8:20: note: expanded from macro 'PMD_ORDER'
       8 | #define PMD_ORDER       (PMD_SHIFT - PAGE_SHIFT)
         |                          ^~~~~~~~~
   1 error generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for DRM_GEM_SHMEM_HELPER
   Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for DRM_TTM
   Depends on [n]: HAS_IOMEM [=y] && DRM [=y] && MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && HAS_IOMEM [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for PAGE_POOL
   Depends on [n]: NET [=n]
   Selected by [y]:
   - GKI_HIDDEN_NET_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for NET_DEVLINK
   Depends on [n]: NET [=n]
   Selected by [y]:
   - GKI_HIDDEN_NET_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for DIMLIB
   Depends on [n]: NET [=n]
   Selected by [y]:
   - GKI_HIDDEN_VIRTUAL_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for NET_PTP_CLASSIFY
   Depends on [n]: NET [=n]
   Selected by [y]:
   - GKI_HIDDEN_NET_CONFIGS [=y]
   WARNING: unmet direct dependencies detected for HMM_MIRROR
   Depends on [n]: MMU [=n]
   Selected by [y]:
   - GKI_HIDDEN_DRM_CONFIGS [=y] && DRM [=y]
   WARNING: unmet direct dependencies detected for HVC_DRIVER
   Depends on [n]: TTY [=n]
   Selected by [y]:
   - GKI_HIDDEN_VIRTUAL_CONFIGS [=y]


vim +/PMD_SHIFT +584 drivers/gpu/drm/drm_gem_shmem_helper.c

211b9a39f2619b Loïc Molinari        2025-12-05  572  
fc3bbf34e643fa Pedro Demarchi Gomes 2026-03-18  573  static vm_fault_t drm_gem_shmem_any_fault(struct vm_fault *vmf, unsigned int order)
2194a63a818db7 Noralf Trønnes       2019-03-12  574  {
2194a63a818db7 Noralf Trønnes       2019-03-12  575  	struct vm_area_struct *vma = vmf->vma;
2194a63a818db7 Noralf Trønnes       2019-03-12  576  	struct drm_gem_object *obj = vma->vm_private_data;
2194a63a818db7 Noralf Trønnes       2019-03-12  577  	struct drm_gem_shmem_object *shmem = to_drm_gem_shmem_obj(obj);
2194a63a818db7 Noralf Trønnes       2019-03-12  578  	loff_t num_pages = obj->size >> PAGE_SHIFT;
d611b4a0907cec Neil Roberts         2021-02-23  579  	vm_fault_t ret;
211b9a39f2619b Loïc Molinari        2025-12-05  580  	struct page **pages = shmem->pages;
11d5a4745e00e7 Neil Roberts         2021-02-23  581  	pgoff_t page_offset;
211b9a39f2619b Loïc Molinari        2025-12-05  582  	unsigned long pfn;
11d5a4745e00e7 Neil Roberts         2021-02-23  583  
fc3bbf34e643fa Pedro Demarchi Gomes 2026-03-18 @584  	if (order && order != PMD_ORDER)
fc3bbf34e643fa Pedro Demarchi Gomes 2026-03-18  585  		return VM_FAULT_FALLBACK;
fc3bbf34e643fa Pedro Demarchi Gomes 2026-03-18  586  
9d2d49027c3a96 Loïc Molinari        2025-12-05  587  	/* Offset to faulty address in the VMA. */
9d2d49027c3a96 Loïc Molinari        2025-12-05  588  	page_offset = vmf->pgoff - vma->vm_pgoff;
2194a63a818db7 Noralf Trønnes       2019-03-12  589  
21aa27ddc58269 Dmitry Osipenko      2023-05-30  590  	dma_resv_lock(shmem->base.resv, NULL);
2194a63a818db7 Noralf Trønnes       2019-03-12  591  
11d5a4745e00e7 Neil Roberts         2021-02-23  592  	if (page_offset >= num_pages ||
3f6a1e22fae95a Dmitry Osipenko      2022-11-16  593  	    drm_WARN_ON_ONCE(obj->dev, !shmem->pages) ||
d611b4a0907cec Neil Roberts         2021-02-23  594  	    shmem->madv < 0) {
d611b4a0907cec Neil Roberts         2021-02-23  595  		ret = VM_FAULT_SIGBUS;
211b9a39f2619b Loïc Molinari        2025-12-05  596  		goto out;
211b9a39f2619b Loïc Molinari        2025-12-05  597  	}
2194a63a818db7 Noralf Trønnes       2019-03-12  598  
211b9a39f2619b Loïc Molinari        2025-12-05  599  	pfn = page_to_pfn(pages[page_offset]);
fc3bbf34e643fa Pedro Demarchi Gomes 2026-03-18  600  	ret = try_insert_pfn(vmf, order, pfn);
211b9a39f2619b Loïc Molinari        2025-12-05  601  
211b9a39f2619b Loïc Molinari        2025-12-05  602   out:
21aa27ddc58269 Dmitry Osipenko      2023-05-30  603  	dma_resv_unlock(shmem->base.resv);
d611b4a0907cec Neil Roberts         2021-02-23  604  
d611b4a0907cec Neil Roberts         2021-02-23  605  	return ret;
2194a63a818db7 Noralf Trønnes       2019-03-12  606  }
2194a63a818db7 Noralf Trønnes       2019-03-12  607  

:::::: The code at line 584 was first introduced by commit
:::::: fc3bbf34e643faa8678aabdc3810c60109f3435a drm/shmem-helper: Fix huge page mapping in fault handler

:::::: TO: Pedro Demarchi Gomes <pedrodemargomes@gmail.com>
:::::: CC: Boris Brezillon <boris.brezillon@collabora.com>

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

                 reply	other threads:[~2026-05-16 10:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202605161857.dxGE4AQU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.