[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202410221614.07o9QVjo-lkp@intel.com>
Date: Tue, 22 Oct 2024 16:19:04 +0800
From: kernel test robot <lkp@...el.com>
To: Sai Krishna <saikrishnag@...vell.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
sgoutham@...vell.com, gakula@...vell.com, lcherian@...vell.com,
jerinj@...vell.com, hkelam@...vell.com, sbhatta@...vell.com
Cc: oe-kbuild-all@...ts.linux.dev, Sai Krishna <saikrishnag@...vell.com>
Subject: Re: [net-next PATCH 6/6] octeontx2-pf: CN20K mbox implementation
between PF-VF
Hi Sai,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Sai-Krishna/octeontx2-Set-appropriate-PF-VF-masks-and-shifts-based-on-silicon/20241019-043511
base: net-next/main
patch link: https://lore.kernel.org/r/20241018203058.3641959-7-saikrishnag%40marvell.com
patch subject: [net-next PATCH 6/6] octeontx2-pf: CN20K mbox implementation between PF-VF
config: alpha-randconfig-r122-20241022 (https://download.01.org/0day-ci/archive/20241022/202410221614.07o9QVjo-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.0
reproduce: (https://download.01.org/0day-ci/archive/20241022/202410221614.07o9QVjo-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202410221614.07o9QVjo-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:611:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *hwbase @@ got void * @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:611:24: sparse: expected void [noderef] __iomem *hwbase
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:611:24: sparse: got void *
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:620:56: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:671:35: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *addr @@ got void *hwbase @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:671:35: sparse: expected void volatile [noderef] __iomem *addr
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:671:35: sparse: got void *hwbase
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1344:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned long long [usertype] *ptr @@ got void [noderef] __iomem * @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1344:21: sparse: expected unsigned long long [usertype] *ptr
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1344:21: sparse: got void [noderef] __iomem *
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1383:21: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned long long [usertype] *ptr @@ got void [noderef] __iomem * @@
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1383:21: sparse: expected unsigned long long [usertype] *ptr
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1383:21: sparse: got void [noderef] __iomem *
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c: note: in included file (through drivers/net/ethernet/marvell/octeontx2/af/mbox.h, drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h):
>> drivers/net/ethernet/marvell/octeontx2/af/common.h:61:26: sparse: sparse: cast truncates bits from constant value (10000 becomes 0)
vim +611 drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
584
585 static int otx2_pfvf_mbox_init(struct otx2_nic *pf, int numvfs)
586 {
587 void __iomem *hwbase;
588 struct mbox *mbox;
589 int err, vf;
590 u64 base;
591
592 if (!numvfs)
593 return -EINVAL;
594
595 pf->mbox_pfvf = devm_kcalloc(&pf->pdev->dev, numvfs,
596 sizeof(struct mbox), GFP_KERNEL);
597 if (!pf->mbox_pfvf)
598 return -ENOMEM;
599
600 pf->mbox_pfvf_wq = alloc_workqueue("otx2_pfvf_mailbox",
601 WQ_UNBOUND | WQ_HIGHPRI |
602 WQ_MEM_RECLAIM, 0);
603 if (!pf->mbox_pfvf_wq)
604 return -ENOMEM;
605
606 /* For CN20K, PF allocates mbox memory in DRAM and writes PF/VF
607 * regions/offsets in RVU_PF_VF_MBOX_ADDR, the RVU_PFX_FUNC_PFAF_MBOX
608 * gives the aliased address to access PF/VF mailbox regions.
609 */
610 if (is_cn20k(pf->pdev)) {
> 611 hwbase = cn20k_pfvf_mbox_alloc(pf, numvfs);
612 } else {
613 /* On CN10K platform, PF <-> VF mailbox region follows after
614 * PF <-> AF mailbox region.
615 */
616 if (test_bit(CN10K_MBOX, &pf->hw.cap_flag))
617 base = pci_resource_start(pf->pdev, PCI_MBOX_BAR_NUM) +
618 MBOX_SIZE;
619 else
620 base = readq((void __iomem *)((u64)pf->reg_base +
621 RVU_PF_VF_BAR4_ADDR));
622
623 hwbase = ioremap_wc(base, MBOX_SIZE * pf->total_vfs);
624 if (!hwbase) {
625 err = -ENOMEM;
626 goto free_wq;
627 }
628 }
629
630 mbox = &pf->mbox_pfvf[0];
631 err = otx2_mbox_init(&mbox->mbox, hwbase, pf->pdev, pf->reg_base,
632 MBOX_DIR_PFVF, numvfs);
633 if (err)
634 goto free_iomem;
635
636 err = otx2_mbox_init(&mbox->mbox_up, hwbase, pf->pdev, pf->reg_base,
637 MBOX_DIR_PFVF_UP, numvfs);
638 if (err)
639 goto free_iomem;
640
641 for (vf = 0; vf < numvfs; vf++) {
642 mbox->pfvf = pf;
643 INIT_WORK(&mbox->mbox_wrk, otx2_pfvf_mbox_handler);
644 INIT_WORK(&mbox->mbox_up_wrk, otx2_pfvf_mbox_up_handler);
645 mbox++;
646 }
647
648 return 0;
649
650 free_iomem:
651 if (hwbase && !(is_cn20k(pf->pdev)))
652 iounmap(hwbase);
653 free_wq:
654 destroy_workqueue(pf->mbox_pfvf_wq);
655 return err;
656 }
657
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists