From: Boris Brezillon <boris.brezillon@collabora.com>
To: kernel test robot <lkp@intel.com>
Cc: "Loïc Molinari" <loic.molinari@collabora.com>,
llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
dri-devel@lists.freedesktop.org,
"Boris Brezillon" <bbrezillon@kernel.org>
Subject: Re: [drm-misc:drm-misc-next 4/11] 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
Date: Tue, 9 Dec 2025 17:37:46 +0100 [thread overview]
Message-ID: <20251209173746.38931a89@fedora> (raw)
In-Reply-To: <202512092338.ylY8zET6-lkp@intel.com>
On Tue, 9 Dec 2025 23:58:10 +0800
kernel test robot <lkp@intel.com> wrote:
> 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/202512092338.ylY8zET6-lkp@intel.com/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/202512092338.ylY8zET6-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/202512092338.ylY8zET6-lkp@intel.com/
>
> 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);
Hm, smells like a build without CONFIG_MMU=n. I guess we need some
#ifdef CONFIG_MMU around drm_gem_get_unmapped_area() definitions.
> 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
>
prev parent reply other threads:[~2025-12-09 16:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 15:58 [drm-misc:drm-misc-next 4/11] 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 kernel test robot
2025-12-09 16:37 ` Boris Brezillon [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=20251209173746.38931a89@fedora \
--to=boris.brezillon@collabora.com \
--cc=bbrezillon@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=loic.molinari@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox