From: kbuild test robot <lkp@intel.com> To: Diana Craciun <diana.craciun@oss.nxp.com>, alex.williamson@redhat.com, kvm@vger.kernel.org Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, laurentiu.tudor@nxp.com, bharatb.linux@gmail.com, Diana Craciun <diana.craciun@oss.nxp.com>, Bharat Bhushan <Bharat.Bhushan@nxp.com> Subject: Re: [PATCH v2 9/9] vfio/fsl-mc: Add read/write support for fsl-mc devices Date: Sat, 9 May 2020 08:47:24 +0800 [thread overview] Message-ID: <202005090814.FeTBGZEQ%lkp@intel.com> (raw) In-Reply-To: <20200508072039.18146-10-diana.craciun@oss.nxp.com> [-- Attachment #1: Type: text/plain, Size: 8584 bytes --] Hi Diana, I love your patch! Yet something to improve: [auto build test ERROR on vfio/next] [also build test ERROR on linus/master v5.7-rc4 next-20200508] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Diana-Craciun/vfio-fsl-mc-VFIO-support-for-FSL-MC-devices/20200509-034845 base: https://github.com/awilliam/linux-vfio.git next config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_release': drivers/vfio/fsl-mc/vfio_fsl_mc.c:170:9: error: implicit declaration of function 'dprc_reset_container'; did you mean 'resource_contains'? [-Werror=implicit-function-declaration] ret = dprc_reset_container(mc_cont->mc_io, 0, ^~~~~~~~~~~~~~~~~~~~ resource_contains drivers/vfio/fsl-mc/vfio_fsl_mc.c:173:6: error: 'DPRC_RESET_OPTION_NON_RECURSIVE' undeclared (first use in this function) DPRC_RESET_OPTION_NON_RECURSIVE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/vfio/fsl-mc/vfio_fsl_mc.c:173:6: note: each undeclared identifier is reported only once for each function it appears in drivers/vfio/fsl-mc/vfio_fsl_mc.c:177:3: error: implicit declaration of function 'fsl_mc_cleanup_irq_pool'; did you mean 'fsl_mc_free_irqs'? [-Werror=implicit-function-declaration] fsl_mc_cleanup_irq_pool(mc_cont); ^~~~~~~~~~~~~~~~~~~~~~~ fsl_mc_free_irqs drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_read': >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:348:13: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration] data[i] = readq(region->ioaddr + i * sizeof(uint64_t)); ^~~~~ readl drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_send_command': >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:367:3: error: implicit declaration of function 'writeq_relaxed'; did you mean 'writeb_relaxed'? [-Werror=implicit-function-declaration] writeq_relaxed(cmd_data[i], ioaddr + i * sizeof(uint64_t)); ^~~~~~~~~~~~~~ writeb_relaxed >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:370:2: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration] writeq(cmd_data[0], ioaddr); ^~~~~~ writel In file included from include/linux/byteorder/little_endian.h:5:0, from arch/x86/include/uapi/asm/byteorder.h:5, from include/asm-generic/bitops/le.h:6, from arch/x86/include/asm/bitops.h:395, from include/linux/bitops.h:29, from include/linux/kernel.h:12, from arch/x86/include/asm/percpu.h:45, from arch/x86/include/asm/current.h:6, from include/linux/sched.h:12, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/vfio/fsl-mc/vfio_fsl_mc.c:7: >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:380:24: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'? [-Werror=implicit-function-declaration] header = cpu_to_le64(readq_relaxed(ioaddr)); ^ include/uapi/linux/byteorder/little_endian.h:31:51: note: in definition of macro '__cpu_to_le64' #define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) ^ >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:380:12: note: in expansion of macro 'cpu_to_le64' header = cpu_to_le64(readq_relaxed(ioaddr)); ^~~~~~~~~~~ drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_bus_notifier': drivers/vfio/fsl-mc/vfio_fsl_mc.c:517:9: error: 'struct fsl_mc_device' has no member named 'driver_override' mc_dev->driver_override = kasprintf(GFP_KERNEL, "%s", ^~ drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_init_device': drivers/vfio/fsl-mc/vfio_fsl_mc.c:555:8: error: implicit declaration of function 'dprc_setup'; did you mean 'x2apic_setup'? [-Werror=implicit-function-declaration] ret = dprc_setup(mc_dev); ^~~~~~~~~~ x2apic_setup drivers/vfio/fsl-mc/vfio_fsl_mc.c:562:8: error: implicit declaration of function 'dprc_scan_container'; did you mean 'init_section_contains'? [-Werror=implicit-function-declaration] ret = dprc_scan_container(mc_dev, false); ^~~~~~~~~~~~~~~~~~~ init_section_contains drivers/vfio/fsl-mc/vfio_fsl_mc.c:566:3: error: implicit declaration of function 'dprc_cleanup'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration] dprc_cleanup(mc_dev); ^~~~~~~~~~~~ pud_clear drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_device_remove': drivers/vfio/fsl-mc/vfio_fsl_mc.c:625:14: error: 'struct fsl_mc_device' has no member named 'driver_override' kfree(mc_dev->driver_override); ^~ drivers/vfio/fsl-mc/vfio_fsl_mc.c:626:8: error: 'struct fsl_mc_device' has no member named 'driver_override' mc_dev->driver_override = NULL; ^~ cc1: some warnings being treated as errors vim +348 drivers/vfio/fsl-mc/vfio_fsl_mc.c 314 315 static ssize_t vfio_fsl_mc_read(void *device_data, char __user *buf, 316 size_t count, loff_t *ppos) 317 { 318 struct vfio_fsl_mc_device *vdev = device_data; 319 unsigned int index = VFIO_FSL_MC_OFFSET_TO_INDEX(*ppos); 320 loff_t off = *ppos & VFIO_FSL_MC_OFFSET_MASK; 321 struct vfio_fsl_mc_region *region; 322 u64 data[8]; 323 int i; 324 325 /* Read ioctl supported only for DPRC and DPMCP device */ 326 if (strcmp(vdev->mc_dev->obj_desc.type, "dprc") && 327 strcmp(vdev->mc_dev->obj_desc.type, "dpmcp")) 328 return -EINVAL; 329 330 if (index >= vdev->num_regions) 331 return -EINVAL; 332 333 region = &vdev->regions[index]; 334 335 if (!(region->flags & VFIO_REGION_INFO_FLAG_READ)) 336 return -EINVAL; 337 338 if (!region->ioaddr) { 339 region->ioaddr = ioremap(region->addr, region->size); 340 if (!region->ioaddr) 341 return -ENOMEM; 342 } 343 344 if (count != 64 || off != 0) 345 return -EINVAL; 346 347 for (i = 7; i >= 0; i--) > 348 data[i] = readq(region->ioaddr + i * sizeof(uint64_t)); 349 350 if (copy_to_user(buf, data, 64)) 351 return -EFAULT; 352 353 return count; 354 } 355 356 #define MC_CMD_COMPLETION_TIMEOUT_MS 5000 357 #define MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS 500 358 359 static int vfio_fsl_mc_send_command(void __iomem *ioaddr, uint64_t *cmd_data) 360 { 361 int i; 362 enum mc_cmd_status status; 363 unsigned long timeout_usecs = MC_CMD_COMPLETION_TIMEOUT_MS * 1000; 364 365 /* Write at command parameter into portal */ 366 for (i = 7; i >= 1; i--) > 367 writeq_relaxed(cmd_data[i], ioaddr + i * sizeof(uint64_t)); 368 369 /* Write command header in the end */ > 370 writeq(cmd_data[0], ioaddr); 371 372 /* Wait for response before returning to user-space 373 * This can be optimized in future to even prepare response 374 * before returning to user-space and avoid read ioctl. 375 */ 376 for (;;) { 377 u64 header; 378 struct mc_cmd_header *resp_hdr; 379 > 380 header = cpu_to_le64(readq_relaxed(ioaddr)); 381 382 resp_hdr = (struct mc_cmd_header *)&header; 383 status = (enum mc_cmd_status)resp_hdr->status; 384 if (status != MC_CMD_STATUS_READY) 385 break; 386 387 udelay(MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS); 388 timeout_usecs -= MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS; 389 if (timeout_usecs == 0) 390 return -ETIMEDOUT; 391 } 392 393 return 0; 394 } 395 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 71319 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH v2 9/9] vfio/fsl-mc: Add read/write support for fsl-mc devices Date: Sat, 09 May 2020 08:47:24 +0800 [thread overview] Message-ID: <202005090814.FeTBGZEQ%lkp@intel.com> (raw) In-Reply-To: <20200508072039.18146-10-diana.craciun@oss.nxp.com> [-- Attachment #1: Type: text/plain, Size: 8772 bytes --] Hi Diana, I love your patch! Yet something to improve: [auto build test ERROR on vfio/next] [also build test ERROR on linus/master v5.7-rc4 next-20200508] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Diana-Craciun/vfio-fsl-mc-VFIO-support-for-FSL-MC-devices/20200509-034845 base: https://github.com/awilliam/linux-vfio.git next config: i386-allyesconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@intel.com> All error/warnings (new ones prefixed by >>): drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_release': drivers/vfio/fsl-mc/vfio_fsl_mc.c:170:9: error: implicit declaration of function 'dprc_reset_container'; did you mean 'resource_contains'? [-Werror=implicit-function-declaration] ret = dprc_reset_container(mc_cont->mc_io, 0, ^~~~~~~~~~~~~~~~~~~~ resource_contains drivers/vfio/fsl-mc/vfio_fsl_mc.c:173:6: error: 'DPRC_RESET_OPTION_NON_RECURSIVE' undeclared (first use in this function) DPRC_RESET_OPTION_NON_RECURSIVE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/vfio/fsl-mc/vfio_fsl_mc.c:173:6: note: each undeclared identifier is reported only once for each function it appears in drivers/vfio/fsl-mc/vfio_fsl_mc.c:177:3: error: implicit declaration of function 'fsl_mc_cleanup_irq_pool'; did you mean 'fsl_mc_free_irqs'? [-Werror=implicit-function-declaration] fsl_mc_cleanup_irq_pool(mc_cont); ^~~~~~~~~~~~~~~~~~~~~~~ fsl_mc_free_irqs drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_read': >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:348:13: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration] data[i] = readq(region->ioaddr + i * sizeof(uint64_t)); ^~~~~ readl drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_send_command': >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:367:3: error: implicit declaration of function 'writeq_relaxed'; did you mean 'writeb_relaxed'? [-Werror=implicit-function-declaration] writeq_relaxed(cmd_data[i], ioaddr + i * sizeof(uint64_t)); ^~~~~~~~~~~~~~ writeb_relaxed >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:370:2: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration] writeq(cmd_data[0], ioaddr); ^~~~~~ writel In file included from include/linux/byteorder/little_endian.h:5:0, from arch/x86/include/uapi/asm/byteorder.h:5, from include/asm-generic/bitops/le.h:6, from arch/x86/include/asm/bitops.h:395, from include/linux/bitops.h:29, from include/linux/kernel.h:12, from arch/x86/include/asm/percpu.h:45, from arch/x86/include/asm/current.h:6, from include/linux/sched.h:12, from include/linux/ratelimit.h:6, from include/linux/dev_printk.h:16, from include/linux/device.h:15, from drivers/vfio/fsl-mc/vfio_fsl_mc.c:7: >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:380:24: error: implicit declaration of function 'readq_relaxed'; did you mean 'readw_relaxed'? [-Werror=implicit-function-declaration] header = cpu_to_le64(readq_relaxed(ioaddr)); ^ include/uapi/linux/byteorder/little_endian.h:31:51: note: in definition of macro '__cpu_to_le64' #define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) ^ >> drivers/vfio/fsl-mc/vfio_fsl_mc.c:380:12: note: in expansion of macro 'cpu_to_le64' header = cpu_to_le64(readq_relaxed(ioaddr)); ^~~~~~~~~~~ drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_bus_notifier': drivers/vfio/fsl-mc/vfio_fsl_mc.c:517:9: error: 'struct fsl_mc_device' has no member named 'driver_override' mc_dev->driver_override = kasprintf(GFP_KERNEL, "%s", ^~ drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_init_device': drivers/vfio/fsl-mc/vfio_fsl_mc.c:555:8: error: implicit declaration of function 'dprc_setup'; did you mean 'x2apic_setup'? [-Werror=implicit-function-declaration] ret = dprc_setup(mc_dev); ^~~~~~~~~~ x2apic_setup drivers/vfio/fsl-mc/vfio_fsl_mc.c:562:8: error: implicit declaration of function 'dprc_scan_container'; did you mean 'init_section_contains'? [-Werror=implicit-function-declaration] ret = dprc_scan_container(mc_dev, false); ^~~~~~~~~~~~~~~~~~~ init_section_contains drivers/vfio/fsl-mc/vfio_fsl_mc.c:566:3: error: implicit declaration of function 'dprc_cleanup'; did you mean 'pud_clear'? [-Werror=implicit-function-declaration] dprc_cleanup(mc_dev); ^~~~~~~~~~~~ pud_clear drivers/vfio/fsl-mc/vfio_fsl_mc.c: In function 'vfio_fsl_mc_device_remove': drivers/vfio/fsl-mc/vfio_fsl_mc.c:625:14: error: 'struct fsl_mc_device' has no member named 'driver_override' kfree(mc_dev->driver_override); ^~ drivers/vfio/fsl-mc/vfio_fsl_mc.c:626:8: error: 'struct fsl_mc_device' has no member named 'driver_override' mc_dev->driver_override = NULL; ^~ cc1: some warnings being treated as errors vim +348 drivers/vfio/fsl-mc/vfio_fsl_mc.c 314 315 static ssize_t vfio_fsl_mc_read(void *device_data, char __user *buf, 316 size_t count, loff_t *ppos) 317 { 318 struct vfio_fsl_mc_device *vdev = device_data; 319 unsigned int index = VFIO_FSL_MC_OFFSET_TO_INDEX(*ppos); 320 loff_t off = *ppos & VFIO_FSL_MC_OFFSET_MASK; 321 struct vfio_fsl_mc_region *region; 322 u64 data[8]; 323 int i; 324 325 /* Read ioctl supported only for DPRC and DPMCP device */ 326 if (strcmp(vdev->mc_dev->obj_desc.type, "dprc") && 327 strcmp(vdev->mc_dev->obj_desc.type, "dpmcp")) 328 return -EINVAL; 329 330 if (index >= vdev->num_regions) 331 return -EINVAL; 332 333 region = &vdev->regions[index]; 334 335 if (!(region->flags & VFIO_REGION_INFO_FLAG_READ)) 336 return -EINVAL; 337 338 if (!region->ioaddr) { 339 region->ioaddr = ioremap(region->addr, region->size); 340 if (!region->ioaddr) 341 return -ENOMEM; 342 } 343 344 if (count != 64 || off != 0) 345 return -EINVAL; 346 347 for (i = 7; i >= 0; i--) > 348 data[i] = readq(region->ioaddr + i * sizeof(uint64_t)); 349 350 if (copy_to_user(buf, data, 64)) 351 return -EFAULT; 352 353 return count; 354 } 355 356 #define MC_CMD_COMPLETION_TIMEOUT_MS 5000 357 #define MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS 500 358 359 static int vfio_fsl_mc_send_command(void __iomem *ioaddr, uint64_t *cmd_data) 360 { 361 int i; 362 enum mc_cmd_status status; 363 unsigned long timeout_usecs = MC_CMD_COMPLETION_TIMEOUT_MS * 1000; 364 365 /* Write at command parameter into portal */ 366 for (i = 7; i >= 1; i--) > 367 writeq_relaxed(cmd_data[i], ioaddr + i * sizeof(uint64_t)); 368 369 /* Write command header in the end */ > 370 writeq(cmd_data[0], ioaddr); 371 372 /* Wait for response before returning to user-space 373 * This can be optimized in future to even prepare response 374 * before returning to user-space and avoid read ioctl. 375 */ 376 for (;;) { 377 u64 header; 378 struct mc_cmd_header *resp_hdr; 379 > 380 header = cpu_to_le64(readq_relaxed(ioaddr)); 381 382 resp_hdr = (struct mc_cmd_header *)&header; 383 status = (enum mc_cmd_status)resp_hdr->status; 384 if (status != MC_CMD_STATUS_READY) 385 break; 386 387 udelay(MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS); 388 timeout_usecs -= MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS; 389 if (timeout_usecs == 0) 390 return -ETIMEDOUT; 391 } 392 393 return 0; 394 } 395 --- 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: 71319 bytes --]
next prev parent reply other threads:[~2020-05-09 0:47 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-08 7:20 [PATCH v2 0/9] vfio/fsl-mc: VFIO support for FSL-MC devices Diana Craciun 2020-05-08 7:20 ` [PATCH v2 1/9] vfio/fsl-mc: Add VFIO framework skeleton for fsl-mc devices Diana Craciun 2020-05-08 7:20 ` [PATCH v2 2/9] vfio/fsl-mc: Scan DPRC objects on vfio-fsl-mc driver bind Diana Craciun 2020-05-08 22:49 ` kbuild test robot 2020-05-08 22:49 ` kbuild test robot 2020-06-02 4:12 ` Alex Williamson 2020-05-08 7:20 ` [PATCH v2 3/9] vfio/fsl-mc: Implement VFIO_DEVICE_GET_INFO ioctl Diana Craciun 2020-05-08 7:20 ` [PATCH v2 4/9] vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl call Diana Craciun 2020-06-02 4:12 ` Alex Williamson 2020-06-04 18:37 ` Diana Craciun OSS 2020-05-08 7:20 ` [PATCH v2 5/9] vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions Diana Craciun 2020-06-02 4:12 ` Alex Williamson 2020-06-04 18:41 ` Diana Craciun OSS 2020-05-08 7:20 ` [PATCH v2 6/9] vfio/fsl-mc: Added lock support in preparation for interrupt handling Diana Craciun 2020-05-08 7:20 ` [PATCH v2 7/9] vfio/fsl-mc: Add irq infrastructure for fsl-mc devices Diana Craciun 2020-05-08 7:20 ` [PATCH v2 8/9] vfio/fsl-mc: trigger an interrupt via eventfd Diana Craciun 2020-05-08 23:50 ` kbuild test robot 2020-05-08 23:50 ` kbuild test robot 2020-05-08 7:20 ` [PATCH v2 9/9] vfio/fsl-mc: Add read/write support for fsl-mc devices Diana Craciun 2020-05-09 0:47 ` kbuild test robot [this message] 2020-05-09 0:47 ` kbuild test robot
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=202005090814.FeTBGZEQ%lkp@intel.com \ --to=lkp@intel.com \ --cc=Bharat.Bhushan@nxp.com \ --cc=alex.williamson@redhat.com \ --cc=bharatb.linux@gmail.com \ --cc=diana.craciun@oss.nxp.com \ --cc=kbuild-all@lists.01.org \ --cc=kvm@vger.kernel.org \ --cc=laurentiu.tudor@nxp.com \ --cc=linux-kernel@vger.kernel.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: linkBe 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.