CC: [email protected]
TO: Otavio Salvador <[email protected]>

tree:   https://github.com/Freescale/linux-fslc pr/78
head:   35b10ca99cd3cb57e545010466bbd588987c96f6
commit: c4287bfaf7c63415030936b0a55fe255738cb167 [2753/3687] vfio/fsl-mc: Add 
read/write support for fsl-mc devices
:::::: branch date: 8 months ago
:::::: commit date: 9 months ago
config: i386-randconfig-s001-20210128 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-212-g56dbccf5-dirty
        # 
https://github.com/Freescale/linux-fslc/commit/c4287bfaf7c63415030936b0a55fe255738cb167
        git remote add freescale-fslc https://github.com/Freescale/linux-fslc
        git fetch --no-tags freescale-fslc pr/78
        git checkout c4287bfaf7c63415030936b0a55fe255738cb167
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


"sparse warnings: (new ones prefixed by >>)"
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:163:26: sparse: sparse: undefined 
identifier 'to_fsl_mc_bus'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:168:23: sparse: sparse: undefined 
identifier 'dprc_reset_container'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:174:17: sparse: sparse: undefined 
identifier 'fsl_mc_cleanup_irq_pool'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:348:27: sparse: sparse: undefined 
identifier 'readq'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:367:17: sparse: sparse: undefined 
identifier 'writeq_relaxed'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:370:9: sparse: sparse: undefined 
identifier 'writeq'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:380:26: sparse: sparse: undefined 
identifier 'readq_relaxed'
>> drivers/vfio/fsl-mc/vfio_fsl_mc.c:380:26: sparse: sparse: cast from unknown 
>> type
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:523:15: sparse: sparse: undefined 
identifier 'fsl_create_mc_io'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:533:15: sparse: sparse: undefined 
identifier 'dprc_open'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:540:18: sparse: sparse: undefined 
identifier 'to_fsl_mc_bus'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:542:9: sparse: sparse: undefined 
identifier 'fsl_mc_init_all_resource_pools'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:544:9: sparse: sparse: using member 
'scan_mutex' in incomplete struct fsl_mc_bus
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:546:9: sparse: sparse: using member 
'scan_mutex' in incomplete struct fsl_mc_bus
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:547:15: sparse: sparse: undefined 
identifier 'dprc_scan_objects'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:549:29: sparse: sparse: using member 
'scan_mutex' in incomplete struct fsl_mc_bus
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:556:25: sparse: sparse: undefined 
identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:557:17: sparse: sparse: undefined 
identifier 'FSL_MC_IRQ_POOL_MAX_TOTAL_IRQS'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:565:9: sparse: sparse: undefined 
identifier 'fsl_mc_cleanup_all_resource_pools'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:566:9: sparse: sparse: undefined 
identifier 'dprc_close'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:569:9: sparse: sparse: undefined 
identifier 'fsl_destroy_mc_io'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:635:9: sparse: sparse: undefined 
identifier 'fsl_mc_device_remove'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:643:9: sparse: sparse: undefined 
identifier 'fsl_mc_cleanup_all_resource_pools'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:644:9: sparse: sparse: undefined 
identifier 'dprc_close'
   drivers/vfio/fsl-mc/vfio_fsl_mc.c:645:9: sparse: sparse: undefined 
identifier 'fsl_destroy_mc_io'

vim +380 drivers/vfio/fsl-mc/vfio_fsl_mc.c

c4287bfaf7c634 Diana Craciun  2019-10-02  358  
c4287bfaf7c634 Diana Craciun  2019-10-02  359  static int 
vfio_fsl_mc_send_command(void __iomem *ioaddr, uint64_t *cmd_data)
c4287bfaf7c634 Diana Craciun  2019-10-02  360  {
c4287bfaf7c634 Diana Craciun  2019-10-02  361   int i;
c4287bfaf7c634 Diana Craciun  2019-10-02  362   enum mc_cmd_status status;
c4287bfaf7c634 Diana Craciun  2019-10-02  363   unsigned long timeout_usecs = 
MC_CMD_COMPLETION_TIMEOUT_MS * 1000;
c4287bfaf7c634 Diana Craciun  2019-10-02  364  
c4287bfaf7c634 Diana Craciun  2019-10-02  365   /* Write at command parameter 
into portal */
c4287bfaf7c634 Diana Craciun  2019-10-02  366   for (i = 7; i >= 1; i--)
c4287bfaf7c634 Diana Craciun  2019-10-02  367           
writeq_relaxed(cmd_data[i], ioaddr + i * sizeof(uint64_t));
c4287bfaf7c634 Diana Craciun  2019-10-02  368  
c4287bfaf7c634 Diana Craciun  2019-10-02  369   /* Write command header in the 
end */
c4287bfaf7c634 Diana Craciun  2019-10-02  370   writeq(cmd_data[0], ioaddr);
c4287bfaf7c634 Diana Craciun  2019-10-02  371  
c4287bfaf7c634 Diana Craciun  2019-10-02  372   /* Wait for response before 
returning to user-space
c4287bfaf7c634 Diana Craciun  2019-10-02  373    * This can be optimized in 
future to even prepare response
c4287bfaf7c634 Diana Craciun  2019-10-02  374    * before returning to 
user-space and avoid read ioctl.
c4287bfaf7c634 Diana Craciun  2019-10-02  375    */
c4287bfaf7c634 Diana Craciun  2019-10-02  376   for (;;) {
c4287bfaf7c634 Diana Craciun  2019-10-02  377           u64 header;
c4287bfaf7c634 Diana Craciun  2019-10-02  378           struct mc_cmd_header 
*resp_hdr;
c4287bfaf7c634 Diana Craciun  2019-10-02  379  
c4287bfaf7c634 Diana Craciun  2019-10-02 @380           header = 
cpu_to_le64(readq_relaxed(ioaddr));
c4287bfaf7c634 Diana Craciun  2019-10-02  381  
c4287bfaf7c634 Diana Craciun  2019-10-02  382           resp_hdr = (struct 
mc_cmd_header *)&header;
c4287bfaf7c634 Diana Craciun  2019-10-02  383           status = (enum 
mc_cmd_status)resp_hdr->status;
c4287bfaf7c634 Diana Craciun  2019-10-02  384           if (status != 
MC_CMD_STATUS_READY)
c4287bfaf7c634 Diana Craciun  2019-10-02  385                   break;
c4287bfaf7c634 Diana Craciun  2019-10-02  386  
c4287bfaf7c634 Diana Craciun  2019-10-02  387           
udelay(MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS);
c4287bfaf7c634 Diana Craciun  2019-10-02  388           timeout_usecs -= 
MC_CMD_COMPLETION_POLLING_MAX_SLEEP_USECS;
c4287bfaf7c634 Diana Craciun  2019-10-02  389           if (timeout_usecs == 0)
c4287bfaf7c634 Diana Craciun  2019-10-02  390                   return 
-ETIMEDOUT;
21a89eb667e31f Bharat Bhushan 2017-05-12  391   }
21a89eb667e31f Bharat Bhushan 2017-05-12  392  
c4287bfaf7c634 Diana Craciun  2019-10-02  393   return 0;
c4287bfaf7c634 Diana Craciun  2019-10-02  394  }
c4287bfaf7c634 Diana Craciun  2019-10-02  395  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to