All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [willy-pagecache:headers 16/21] drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:236:2: error: call to undeclared function 'unlock_page'; ISO C99 and later do not support implicit function declarations
Date: Tue, 25 Aug 2026 22:03:20 +0800	[thread overview]
Message-ID: <202608252110.deAyQBf3-lkp@intel.com> (raw)

tree:   git://git.infradead.org/users/willy/pagecache headers
head:   2c16f123eb253c5d93edfe0e5439120f8f7e3afa
commit: 8f4b7541e27a9da8c5d1d0908af1e739b6e05e05 [16/21] drm/amd: Remove pagemap.h includes
config: x86_64-randconfig-005-20260825 (https://download.01.org/0day-ci/archive/20260825/202608252110.deAyQBf3-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260825/202608252110.deAyQBf3-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/202608252110.deAyQBf3-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:236:2: error: call to undeclared function 'unlock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     236 |         unlock_page(page);
         |         ^
>> drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:256:3: error: call to undeclared function 'lock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     256 |                 lock_page(page);
         |                 ^
   drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:256:3: note: did you mean 'copy_page'?
   arch/x86/include/asm/page_64.h:117:6: note: 'copy_page' declared here
     117 | void copy_page(void *to, void *from);
         |      ^
   drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c:266:2: error: call to undeclared function 'unlock_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     266 |         unlock_page(page);
         |         ^
   3 errors generated.


vim +/unlock_page +236 drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_migrate.c

0b0e518d61af8e1 Felix Kuehling 2021-02-24  229  
0b0e518d61af8e1 Felix Kuehling 2021-02-24  230  static void
0b0e518d61af8e1 Felix Kuehling 2021-02-24  231  svm_migrate_put_vram_page(struct amdgpu_device *adev, unsigned long addr)
0b0e518d61af8e1 Felix Kuehling 2021-02-24  232  {
0b0e518d61af8e1 Felix Kuehling 2021-02-24  233  	struct page *page;
0b0e518d61af8e1 Felix Kuehling 2021-02-24  234  
0b0e518d61af8e1 Felix Kuehling 2021-02-24  235  	page = pfn_to_page(svm_migrate_addr_to_pfn(adev, addr));
0b0e518d61af8e1 Felix Kuehling 2021-02-24 @236  	unlock_page(page);
0b0e518d61af8e1 Felix Kuehling 2021-02-24  237  	put_page(page);
0b0e518d61af8e1 Felix Kuehling 2021-02-24  238  }
0b0e518d61af8e1 Felix Kuehling 2021-02-24  239  
48ff079b28d82db Felix Kuehling 2021-03-17  240  static unsigned long
48ff079b28d82db Felix Kuehling 2021-03-17  241  svm_migrate_addr(struct amdgpu_device *adev, struct page *page)
48ff079b28d82db Felix Kuehling 2021-03-17  242  {
48ff079b28d82db Felix Kuehling 2021-03-17  243  	unsigned long addr;
48ff079b28d82db Felix Kuehling 2021-03-17  244  
48ff079b28d82db Felix Kuehling 2021-03-17  245  	addr = page_to_pfn(page) << PAGE_SHIFT;
610dab118ff5013 Philip Yang    2023-03-31  246  	return (addr - adev->kfd.pgmap.range.start);
48ff079b28d82db Felix Kuehling 2021-03-17  247  }
48ff079b28d82db Felix Kuehling 2021-03-17  248  
48ff079b28d82db Felix Kuehling 2021-03-17  249  static struct page *
48ff079b28d82db Felix Kuehling 2021-03-17  250  svm_migrate_get_sys_page(struct vm_area_struct *vma, unsigned long addr)
48ff079b28d82db Felix Kuehling 2021-03-17  251  {
48ff079b28d82db Felix Kuehling 2021-03-17  252  	struct page *page;
48ff079b28d82db Felix Kuehling 2021-03-17  253  
48ff079b28d82db Felix Kuehling 2021-03-17  254  	page = alloc_page_vma(GFP_HIGHUSER, vma, addr);
48ff079b28d82db Felix Kuehling 2021-03-17  255  	if (page)
48ff079b28d82db Felix Kuehling 2021-03-17 @256  		lock_page(page);
48ff079b28d82db Felix Kuehling 2021-03-17  257  
48ff079b28d82db Felix Kuehling 2021-03-17  258  	return page;
48ff079b28d82db Felix Kuehling 2021-03-17  259  }
48ff079b28d82db Felix Kuehling 2021-03-17  260  

:::::: The code at line 236 was first introduced by commit
:::::: 0b0e518d61af8e1cb73cbbfb313b215640c8a6f3 drm/amdkfd: HMM migrate ram to vram

:::::: TO: Felix Kuehling <Felix.Kuehling@amd.com>
:::::: CC: Alex Deucher <alexander.deucher@amd.com>

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

                 reply	other threads:[~2026-08-25 14:04 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=202608252110.deAyQBf3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.org \
    /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.