Hi Diana,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: cc0ee20bd96971c10eba9a83ecf1c0733078a083 vfio/fsl-mc: trigger an interrupt via eventfd
date: 3 weeks ago
config: arm64-randconfig-r026-20201101 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 235dfcf70abca65dba5d80f1a42d1485bab8980c)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc0ee20bd96971c10eba9a83ecf1c0733078a083
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout cc0ee20bd96971c10eba9a83ecf1c0733078a083
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
>> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes]
int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
^
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
^
static
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:121:8: error: implicit declaration of function 'fsl_mc_populate_irq_pool' [-Werror,-Wimplicit-function-declaration]
ret = fsl_mc_populate_irq_pool(mc_cont,
^
drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:122:4: error: use of undeclared identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
^
1 warning and 2 errors generated.
vim +/vfio_fsl_mc_irqs_allocate +16 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
15
> 16 int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
17 {
18 struct fsl_mc_device *mc_dev = vdev->mc_dev;
19 struct vfio_fsl_mc_irq *mc_irq;
20 int irq_count;
21 int ret, i;
22
23 /* Device does not support any interrupt */
24 if (mc_dev->obj_desc.irq_count == 0)
25 return 0;
26
27 /* interrupts were already allocated for this device */
28 if (vdev->mc_irqs)
29 return 0;
30
31 irq_count = mc_dev->obj_desc.irq_count;
32
33 mc_irq = kcalloc(irq_count, sizeof(*mc_irq), GFP_KERNEL);
34 if (!mc_irq)
35 return -ENOMEM;
36
37 /* Allocate IRQs */
38 ret = fsl_mc_allocate_irqs(mc_dev);
39 if (ret) {
40 kfree(mc_irq);
41 return ret;
42 }
43
44 for (i = 0; i < irq_count; i++) {
45 mc_irq[i].count = 1;
46 mc_irq[i].flags = VFIO_IRQ_INFO_EVENTFD;
47 }
48
49 vdev->mc_irqs = mc_irq;
50
51 return 0;
52 }
53
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Hi,
The warning is fixed by this patch:
https://www.spinics.net/lists/kvm/msg227575.html
The errors are caused by the fact that the vfio fsl-mc patches have a
dependency on the fsl-mc bus series. For this particular error the
missing patch is: bus/fsl-mc: Export IRQ pool handling functions to be
used by VFIO. But the entire series should be merged before the
vfio-fsl-mc patches.
I have verified compilation with clang on the master branch and there
are no errors.
Diana
On 11/3/2020 9:54 AM, kernel test robot wrote:
> Hi Diana,
>
> FYI, the error/warning still remains.
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
> commit: cc0ee20bd96971c10eba9a83ecf1c0733078a083 vfio/fsl-mc: trigger an interrupt via eventfd
> date: 3 weeks ago
> config: arm64-randconfig-r026-20201101 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 235dfcf70abca65dba5d80f1a42d1485bab8980c)
> 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 arm64 cross compiling tool for clang build
> # apt-get install binutils-aarch64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cc0ee20bd96971c10eba9a83ecf1c0733078a083
> git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> git fetch --no-tags linus master
> git checkout cc0ee20bd96971c10eba9a83ecf1c0733078a083
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <[email protected]>
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:5: warning: no previous prototype for function 'vfio_fsl_mc_irqs_allocate' [-Wmissing-prototypes]
> int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
> ^
> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:16:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
> ^
> static
> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:121:8: error: implicit declaration of function 'fsl_mc_populate_irq_pool' [-Werror,-Wimplicit-function-declaration]
> ret = fsl_mc_populate_irq_pool(mc_cont,
> ^
> drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c:122:4: error: use of undeclared identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
> FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS);
> ^
> 1 warning and 2 errors generated.
>
> vim +/vfio_fsl_mc_irqs_allocate +16 drivers/vfio/fsl-mc/vfio_fsl_mc_intr.c
>
> 15
> > 16 int vfio_fsl_mc_irqs_allocate(struct vfio_fsl_mc_device *vdev)
> 17 {
> 18 struct fsl_mc_device *mc_dev = vdev->mc_dev;
> 19 struct vfio_fsl_mc_irq *mc_irq;
> 20 int irq_count;
> 21 int ret, i;
> 22
> 23 /* Device does not support any interrupt */
> 24 if (mc_dev->obj_desc.irq_count == 0)
> 25 return 0;
> 26
> 27 /* interrupts were already allocated for this device */
> 28 if (vdev->mc_irqs)
> 29 return 0;
> 30
> 31 irq_count = mc_dev->obj_desc.irq_count;
> 32
> 33 mc_irq = kcalloc(irq_count, sizeof(*mc_irq), GFP_KERNEL);
> 34 if (!mc_irq)
> 35 return -ENOMEM;
> 36
> 37 /* Allocate IRQs */
> 38 ret = fsl_mc_allocate_irqs(mc_dev);
> 39 if (ret) {
> 40 kfree(mc_irq);
> 41 return ret;
> 42 }
> 43
> 44 for (i = 0; i < irq_count; i++) {
> 45 mc_irq[i].count = 1;
> 46 mc_irq[i].flags = VFIO_IRQ_INFO_EVENTFD;
> 47 }
> 48
> 49 vdev->mc_irqs = mc_irq;
> 50
> 51 return 0;
> 52 }
> 53
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/[email protected]
>