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/[email protected]/config) compiler: m68k-linux-gcc (GCC) 15.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260315/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ 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
