From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC v3 1/2] vfio/platform: add support for msi
Date: Sun, 27 Dec 2020 16:44:16 +0800 [thread overview]
Message-ID: <202012271607.HThOozoZ-lkp@intel.com> (raw)
In-Reply-To: <20201214174514.22006-2-vikas.gupta@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 12688 bytes --]
Hi Vikas,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on vfio/next]
[also build test ERROR on v5.10 next-20201223]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Vikas-Gupta/msi-support-for-platform-devices/20201215-015115
base: https://github.com/awilliam/linux-vfio.git next
config: arm-randconfig-r021-20201221 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
# https://github.com/0day-ci/linux/commit/029a6fee02b683d688d7e6e685c78127ac29df8a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Vikas-Gupta/msi-support-for-platform-devices/20201215-015115
git checkout 029a6fee02b683d688d7e6e685c78127ac29df8a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 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/platform/vfio_platform_irq.c: In function 'vfio_msi_enable':
>> drivers/vfio/platform/vfio_platform_irq.c:299:8: error: implicit declaration of function 'platform_msi_domain_alloc_irqs' [-Werror=implicit-function-declaration]
299 | ret = platform_msi_domain_alloc_irqs(dev, nvec, msi_write);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/eventfd.h:13,
from drivers/vfio/platform/vfio_platform_irq.c:9:
>> include/linux/msi.h:135:38: error: 'struct device' has no member named 'msi_list'
135 | #define dev_to_msi_list(dev) (&(dev)->msi_list)
| ^~
include/linux/kernel.h:852:26: note: in definition of macro 'container_of'
852 | void *__mptr = (void *)(ptr); \
| ^~~
include/linux/list.h:522:2: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:13: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
include/linux/msi.h:139:2: note: in expansion of macro 'list_for_each_entry'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~~~~~
include/linux/msi.h:139:30: note: in expansion of macro 'dev_to_msi_list'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~
drivers/vfio/platform/vfio_platform_irq.c:305:2: note: in expansion of macro 'for_each_msi_entry'
305 | for_each_msi_entry(desc, dev) {
| ^~~~~~~~~~~~~~~~~~
In file included from <command-line>:
>> include/linux/msi.h:135:38: error: 'struct device' has no member named 'msi_list'
135 | #define dev_to_msi_list(dev) (&(dev)->msi_list)
| ^~
include/linux/compiler_types.h:295:9: note: in definition of macro '__compiletime_assert'
295 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:315:2: note: in expansion of macro '_compiletime_assert'
315 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:853:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
853 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:853:20: note: in expansion of macro '__same_type'
853 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/list.h:511:2: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:522:2: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:13: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
include/linux/msi.h:139:2: note: in expansion of macro 'list_for_each_entry'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~~~~~
include/linux/msi.h:139:30: note: in expansion of macro 'dev_to_msi_list'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~
drivers/vfio/platform/vfio_platform_irq.c:305:2: note: in expansion of macro 'for_each_msi_entry'
305 | for_each_msi_entry(desc, dev) {
| ^~~~~~~~~~~~~~~~~~
>> include/linux/msi.h:135:38: error: 'struct device' has no member named 'msi_list'
135 | #define dev_to_msi_list(dev) (&(dev)->msi_list)
| ^~
include/linux/compiler_types.h:295:9: note: in definition of macro '__compiletime_assert'
295 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:315:2: note: in expansion of macro '_compiletime_assert'
315 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:853:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
853 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:854:6: note: in expansion of macro '__same_type'
854 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/list.h:511:2: note: in expansion of macro 'container_of'
511 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/list.h:522:2: note: in expansion of macro 'list_entry'
522 | list_entry((ptr)->next, type, member)
| ^~~~~~~~~~
include/linux/list.h:628:13: note: in expansion of macro 'list_first_entry'
628 | for (pos = list_first_entry(head, typeof(*pos), member); \
| ^~~~~~~~~~~~~~~~
include/linux/msi.h:139:2: note: in expansion of macro 'list_for_each_entry'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~~~~~
include/linux/msi.h:139:30: note: in expansion of macro 'dev_to_msi_list'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~
drivers/vfio/platform/vfio_platform_irq.c:305:2: note: in expansion of macro 'for_each_msi_entry'
305 | for_each_msi_entry(desc, dev) {
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/wait.h:7,
from include/linux/eventfd.h:13,
from drivers/vfio/platform/vfio_platform_irq.c:9:
>> include/linux/msi.h:135:38: error: 'struct device' has no member named 'msi_list'
135 | #define dev_to_msi_list(dev) (&(dev)->msi_list)
| ^~
include/linux/list.h:619:20: note: in definition of macro 'list_entry_is_head'
619 | (&pos->member == (head))
| ^~~~
include/linux/msi.h:139:2: note: in expansion of macro 'list_for_each_entry'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~~~~~
include/linux/msi.h:139:30: note: in expansion of macro 'dev_to_msi_list'
139 | list_for_each_entry((desc), dev_to_msi_list((dev)), list)
| ^~~~~~~~~~~~~~~
drivers/vfio/platform/vfio_platform_irq.c:305:2: note: in expansion of macro 'for_each_msi_entry'
305 | for_each_msi_entry(desc, dev) {
| ^~~~~~~~~~~~~~~~~~
drivers/vfio/platform/vfio_platform_irq.c: In function 'vfio_msi_disable':
>> drivers/vfio/platform/vfio_platform_irq.c:390:2: error: implicit declaration of function 'platform_msi_domain_free_irqs' [-Werror=implicit-function-declaration]
390 | platform_msi_domain_free_irqs(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/platform_msi_domain_alloc_irqs +299 drivers/vfio/platform/vfio_platform_irq.c
285
286 static int vfio_msi_enable(struct vfio_platform_device *vdev,
287 struct vfio_platform_irq *irq, int nvec)
288 {
289 int ret;
290 int msi_idx = 0;
291 struct msi_desc *desc;
292 struct device *dev = vdev->device;
293
294 irq->ctx = kcalloc(nvec, sizeof(struct vfio_irq_ctx), GFP_KERNEL);
295 if (!irq->ctx)
296 return -ENOMEM;
297
298 /* Allocate platform MSIs */
> 299 ret = platform_msi_domain_alloc_irqs(dev, nvec, msi_write);
300 if (ret < 0) {
301 kfree(irq->ctx);
302 return ret;
303 }
304
305 for_each_msi_entry(desc, dev) {
306 irq->ctx[msi_idx].hwirq = desc->irq;
307 msi_idx++;
308 }
309
310 irq->num_ctx = nvec;
311 irq->config_msi = 1;
312
313 return 0;
314 }
315
316 static int vfio_msi_set_vector_signal(struct vfio_platform_irq *irq,
317 int vector, int fd)
318 {
319 struct eventfd_ctx *trigger;
320 int irq_num, ret;
321
322 if (vector < 0 || vector >= irq->num_ctx)
323 return -EINVAL;
324
325 irq_num = irq->ctx[vector].hwirq;
326
327 if (irq->ctx[vector].trigger) {
328 free_irq(irq_num, irq->ctx[vector].trigger);
329 kfree(irq->ctx[vector].name);
330 eventfd_ctx_put(irq->ctx[vector].trigger);
331 irq->ctx[vector].trigger = NULL;
332 }
333
334 if (fd < 0)
335 return 0;
336
337 irq->ctx[vector].name = kasprintf(GFP_KERNEL,
338 "vfio-msi[%d]", vector);
339 if (!irq->ctx[vector].name)
340 return -ENOMEM;
341
342 trigger = eventfd_ctx_fdget(fd);
343 if (IS_ERR(trigger)) {
344 kfree(irq->ctx[vector].name);
345 return PTR_ERR(trigger);
346 }
347
348 ret = request_irq(irq_num, vfio_msihandler, 0,
349 irq->ctx[vector].name, trigger);
350 if (ret) {
351 kfree(irq->ctx[vector].name);
352 eventfd_ctx_put(trigger);
353 return ret;
354 }
355
356 irq->ctx[vector].trigger = trigger;
357
358 return 0;
359 }
360
361 static int vfio_msi_set_block(struct vfio_platform_irq *irq, unsigned int start,
362 unsigned int count, int32_t *fds)
363 {
364 int i, j, ret = 0;
365
366 if (start >= irq->num_ctx || start + count > irq->num_ctx)
367 return -EINVAL;
368
369 for (i = 0, j = start; i < count && !ret; i++, j++) {
370 int fd = fds ? fds[i] : -1;
371
372 ret = vfio_msi_set_vector_signal(irq, j, fd);
373 }
374
375 if (ret) {
376 for (--j; j >= (int)start; j--)
377 vfio_msi_set_vector_signal(irq, j, -1);
378 }
379
380 return ret;
381 }
382
383 static void vfio_msi_disable(struct vfio_platform_device *vdev,
384 struct vfio_platform_irq *irq)
385 {
386 struct device *dev = vdev->device;
387
388 vfio_msi_set_block(irq, 0, irq->num_ctx, NULL);
389
> 390 platform_msi_domain_free_irqs(dev);
391
392 irq->config_msi = 0;
393 irq->num_ctx = 0;
394
395 kfree(irq->ctx);
396 }
397
---
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: 23238 bytes --]
next prev parent reply other threads:[~2020-12-27 8:44 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 6:02 [RFC, v0 0/3] msi support for platform devices Vikas Gupta
2020-11-05 6:02 ` [RFC, v0 1/3] vfio/platform: add support for msi Vikas Gupta
2020-11-05 7:08 ` Alex Williamson
2020-11-06 2:54 ` Vikas Gupta
2020-11-06 3:12 ` Alex Williamson
2020-11-09 6:41 ` Vikas Gupta
2020-11-09 15:18 ` Auger Eric
2020-11-09 15:28 ` Alex Williamson
2020-11-10 11:06 ` Vikas Gupta
2020-11-09 15:05 ` Auger Eric
2020-11-10 11:01 ` Vikas Gupta
2020-11-05 6:02 ` [RFC, v0 2/3] vfio/platform: change cleanup order Vikas Gupta
2020-11-05 6:02 ` [RFC, v0 3/3] vfio/platform: add Broadcom msi module Vikas Gupta
2020-11-12 17:58 ` [RFC, v1 0/3] msi support for platform devices Vikas Gupta
2020-11-12 17:58 ` [RFC v1 1/3] vfio/platform: add support for msi Vikas Gupta
2020-11-12 17:58 ` [RFC v1 2/3] vfio/platform: change cleanup order Vikas Gupta
2020-11-12 17:58 ` [RFC v1 3/3] vfio/platform: add Broadcom msi module Vikas Gupta
2020-11-12 18:40 ` [RFC, v1 0/3] msi support for platform devices Auger Eric
2020-11-13 17:24 ` Vikas Gupta
2020-11-16 13:14 ` Auger Eric
2020-11-17 6:25 ` Vikas Gupta
2020-11-17 8:05 ` Auger Eric
2020-11-17 8:25 ` Auger Eric
2020-11-17 16:36 ` Vikas Gupta
2020-11-18 11:00 ` Auger Eric
2020-11-24 16:16 ` [RFC, v2 0/1] " Vikas Gupta
2020-11-24 16:16 ` [RFC v2 1/1] vfio/platform: add support for msi Vikas Gupta
2020-12-02 14:44 ` Auger Eric
2020-12-03 14:50 ` Vikas Gupta
2020-12-07 20:43 ` Auger Eric
2020-12-10 7:34 ` Vikas Gupta
2020-12-11 8:40 ` Auger Eric
2020-12-02 14:43 ` [RFC, v2 0/1] msi support for platform devices Auger Eric
2020-12-03 14:39 ` Vikas Gupta
2020-12-14 17:45 ` [RFC, v3 0/2] " Vikas Gupta
2020-12-14 17:45 ` [RFC v3 1/2] vfio/platform: add support for msi Vikas Gupta
2020-12-22 17:27 ` Auger Eric
2021-01-05 5:53 ` Vikas Gupta
2021-01-12 9:00 ` Auger Eric
2021-01-15 6:26 ` Vikas Gupta
2021-01-15 9:25 ` Auger Eric
2020-12-27 8:44 ` kernel test robot [this message]
2020-12-14 17:45 ` [RFC v3 2/2] vfio/platform: msi: add Broadcom platform devices Vikas Gupta
2021-01-12 9:22 ` Auger Eric
2021-01-15 6:35 ` Vikas Gupta
2021-01-15 9:24 ` Auger Eric
2021-01-19 22:45 ` Alex Williamson
2021-01-20 10:22 ` Auger Eric
2021-01-29 17:24 ` [RFC v4 0/3] msi support for " Vikas Gupta
2021-01-29 17:24 ` [RFC v4 1/3] vfio/platform: add support for msi Vikas Gupta
2021-02-08 13:30 ` Auger Eric
2021-01-29 17:24 ` [RFC v4 2/3] vfio/platform: change cleanup order Vikas Gupta
2021-02-08 13:31 ` Auger Eric
2021-01-29 17:24 ` [RFC v4 3/3] vfio: platform: reset: add msi support Vikas Gupta
2021-02-08 15:27 ` Auger Eric
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=202012271607.HThOozoZ-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.