tree:   https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next
head:   0823bd894278e4c0f1acb8f3a8a3c67745e6d1f6
commit: 99bda20d6d4cac30ed6d357658d8bc328c3b27d9 [4/11] drm/gem: Introduce 
drm_gem_get_unmapped_area() fop
config: arm-randconfig-003-20251209 
(https://download.01.org/0day-ci/archive/20251209/[email protected]/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 
6ec8c4351cfc1d0627d1633b02ea787bd29c77d8)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251209/[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 errors (new ones prefixed by >>):

>> drivers/gpu/drm/drm_gem.c:1261:10: error: call to undeclared function 
>> 'mm_get_unmapped_area'; ISO C99 and later do not support implicit function 
>> declarations [-Wimplicit-function-declaration]
    1261 |                 return mm_get_unmapped_area(current->mm, filp, 
uaddr, len, 0,
         |                        ^
   drivers/gpu/drm/drm_gem.c:1261:10: note: did you mean '__get_unmapped_area'?
   include/linux/mm.h:3441:1: note: '__get_unmapped_area' declared here
    3441 | __get_unmapped_area(struct file *file, unsigned long addr, unsigned 
long len,
         | ^
   1 error generated.


vim +/mm_get_unmapped_area +1261 drivers/gpu/drm/drm_gem.c

  1229  
  1230  /**
  1231   * drm_gem_get_unmapped_area - get memory mapping region routine for 
GEM objects
  1232   * @filp: DRM file pointer
  1233   * @uaddr: User address hint
  1234   * @len: Mapping length
  1235   * @pgoff: Offset (in pages)
  1236   * @flags: Mapping flags
  1237   *
  1238   * If a driver supports GEM object mapping, before ending up in 
drm_gem_mmap(),
  1239   * mmap calls on the DRM file descriptor will first try to find a free 
linear
  1240   * address space large enough for a mapping. Since GEM objects are 
backed by
  1241   * shmem buffers, this should preferably be handled by the shmem 
virtual memory
  1242   * filesystem which can appropriately align addresses to huge page 
sizes when
  1243   * needed.
  1244   *
  1245   * Look up the GEM object based on the offset passed in (vma->vm_pgoff 
will
  1246   * contain the fake offset we created) and call 
shmem_get_unmapped_area() with
  1247   * the right file pointer.
  1248   *
  1249   * If a GEM object is not available at the given offset or if the 
caller is not
  1250   * granted access to it, fall back to mm_get_unmapped_area().
  1251   */
  1252  unsigned long drm_gem_get_unmapped_area(struct file *filp, unsigned 
long uaddr,
  1253                                          unsigned long len, unsigned 
long pgoff,
  1254                                          unsigned long flags)
  1255  {
  1256          struct drm_gem_object *obj;
  1257          unsigned long ret;
  1258  
  1259          obj = drm_gem_object_lookup_at_offset(filp, pgoff, len >> 
PAGE_SHIFT);
  1260          if (IS_ERR(obj) || !obj->filp || 
!obj->filp->f_op->get_unmapped_area)
> 1261                  return mm_get_unmapped_area(current->mm, filp, uaddr, 
> len, 0,
  1262                                              flags);
  1263  
  1264          ret = obj->filp->f_op->get_unmapped_area(obj->filp, uaddr, len, 
0,
  1265                                                   flags);
  1266  
  1267          drm_gem_object_put(obj);
  1268  
  1269          return ret;
  1270  }
  1271  EXPORT_SYMBOL_GPL(drm_gem_get_unmapped_area);
  1272  

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

Reply via email to