From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-stable-rc:linux-5.4.y 5600/6105] drivers/vfio/vfio_iommu_type1.c:366:22: error: implicit declaration of function 'pte_write'
Date: Thu, 06 May 2021 23:51:51 +0800 [thread overview]
Message-ID: <202105062336.5KCPcg2D-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5407 bytes --]
Hi Jason,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
head: 73e74400c797af9bc645d41cfd350b15e3e52d2c
commit: 3c57ea09365f4a6b32568b8ba6b98ae7d238cb0d [5600/6105] vfio: IOMMU_API should be selected
config: arm-randconfig-r014-20210506 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=3c57ea09365f4a6b32568b8ba6b98ae7d238cb0d
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.4.y
git checkout 3c57ea09365f4a6b32568b8ba6b98ae7d238cb0d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/vfio/vfio_iommu_type1.c:366:22: error: implicit declaration of function 'pte_write' [-Werror,-Wimplicit-function-declaration]
if (write_fault && !pte_write(*ptep))
^
>> drivers/vfio/vfio_iommu_type1.c:369:10: error: implicit declaration of function 'pte_pfn' [-Werror,-Wimplicit-function-declaration]
*pfn = pte_pfn(*ptep);
^
drivers/vfio/vfio_iommu_type1.c:369:10: note: did you mean 'put_pfn'?
drivers/vfio/vfio_iommu_type1.c:327:12: note: 'put_pfn' declared here
static int put_pfn(unsigned long pfn, int prot)
^
>> drivers/vfio/vfio_iommu_type1.c:371:2: error: implicit declaration of function 'pte_unmap' [-Werror,-Wimplicit-function-declaration]
pte_unmap_unlock(ptep, ptl);
^
include/linux/mm.h:1988:2: note: expanded from macro 'pte_unmap_unlock'
pte_unmap(pte); \
^
3 errors generated.
vim +/pte_write +366 drivers/vfio/vfio_iommu_type1.c
73fa0d10d077d9 Alex Williamson 2012-07-31 338
270c35d0723a2f Ajay Kaher 2020-09-06 339 static int follow_fault_pfn(struct vm_area_struct *vma, struct mm_struct *mm,
270c35d0723a2f Ajay Kaher 2020-09-06 340 unsigned long vaddr, unsigned long *pfn,
270c35d0723a2f Ajay Kaher 2020-09-06 341 bool write_fault)
270c35d0723a2f Ajay Kaher 2020-09-06 342 {
e41bb745fd0fca Alex Williamson 2021-02-16 343 pte_t *ptep;
e41bb745fd0fca Alex Williamson 2021-02-16 344 spinlock_t *ptl;
270c35d0723a2f Ajay Kaher 2020-09-06 345 int ret;
270c35d0723a2f Ajay Kaher 2020-09-06 346
e41bb745fd0fca Alex Williamson 2021-02-16 347 ret = follow_pte(vma->vm_mm, vaddr, &ptep, &ptl);
270c35d0723a2f Ajay Kaher 2020-09-06 348 if (ret) {
270c35d0723a2f Ajay Kaher 2020-09-06 349 bool unlocked = false;
270c35d0723a2f Ajay Kaher 2020-09-06 350
270c35d0723a2f Ajay Kaher 2020-09-06 351 ret = fixup_user_fault(NULL, mm, vaddr,
270c35d0723a2f Ajay Kaher 2020-09-06 352 FAULT_FLAG_REMOTE |
270c35d0723a2f Ajay Kaher 2020-09-06 353 (write_fault ? FAULT_FLAG_WRITE : 0),
270c35d0723a2f Ajay Kaher 2020-09-06 354 &unlocked);
270c35d0723a2f Ajay Kaher 2020-09-06 355 if (unlocked)
270c35d0723a2f Ajay Kaher 2020-09-06 356 return -EAGAIN;
270c35d0723a2f Ajay Kaher 2020-09-06 357
270c35d0723a2f Ajay Kaher 2020-09-06 358 if (ret)
270c35d0723a2f Ajay Kaher 2020-09-06 359 return ret;
270c35d0723a2f Ajay Kaher 2020-09-06 360
e41bb745fd0fca Alex Williamson 2021-02-16 361 ret = follow_pte(vma->vm_mm, vaddr, &ptep, &ptl);
e41bb745fd0fca Alex Williamson 2021-02-16 362 if (ret)
e41bb745fd0fca Alex Williamson 2021-02-16 363 return ret;
270c35d0723a2f Ajay Kaher 2020-09-06 364 }
270c35d0723a2f Ajay Kaher 2020-09-06 365
e41bb745fd0fca Alex Williamson 2021-02-16 @366 if (write_fault && !pte_write(*ptep))
e41bb745fd0fca Alex Williamson 2021-02-16 367 ret = -EFAULT;
e41bb745fd0fca Alex Williamson 2021-02-16 368 else
e41bb745fd0fca Alex Williamson 2021-02-16 @369 *pfn = pte_pfn(*ptep);
e41bb745fd0fca Alex Williamson 2021-02-16 370
e41bb745fd0fca Alex Williamson 2021-02-16 @371 pte_unmap_unlock(ptep, ptl);
270c35d0723a2f Ajay Kaher 2020-09-06 372 return ret;
270c35d0723a2f Ajay Kaher 2020-09-06 373 }
270c35d0723a2f Ajay Kaher 2020-09-06 374
:::::: The code at line 366 was first introduced by commit
:::::: e41bb745fd0fcaa1d37a7bd4da46230822ffe18f vfio/type1: Use follow_pte()
:::::: TO: Alex Williamson <alex.williamson@redhat.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24256 bytes --]
next reply other threads:[~2021-05-06 15:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 15:51 kernel test robot [this message]
2021-05-06 20:12 ` [linux-stable-rc:linux-5.4.y 5600/6105] drivers/vfio/vfio_iommu_type1.c:366:22: error: implicit declaration of function 'pte_write' Alex Williamson
2021-05-06 20:17 ` Alex Williamson
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=202105062336.5KCPcg2D-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.