mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sai Krishna <saikrishnag@marvell.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, sgoutham@marvell.com,
	gakula@marvell.com, lcherian@marvell.com, jerinj@marvell.com,
	hkelam@marvell.com, sbhatta@marvell.com
Cc: oe-kbuild-all@lists.linux.dev, Sai Krishna <saikrishnag@marvell.com>
Subject: Re: [net-next PATCH 6/6] octeontx2-pf: CN20K mbox implementation between PF-VF
Date: Tue, 22 Oct 2024 16:19:04 +0800	[thread overview]
Message-ID: <202410221614.07o9QVjo-lkp@intel.com> (raw)
In-Reply-To: <20241018203058.3641959-7-saikrishnag@marvell.com>

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@intel.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

      reply	other threads:[~2024-10-22  8:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 20:30 [net-next PATCH 0/6] CN20K silicon with mbox support Sai Krishna
2024-10-18 20:30 ` [net-next PATCH 1/6] octeontx2: Set appropriate PF, VF masks and shifts based on silicon Sai Krishna
2024-10-18 20:30 ` [net-next PATCH 2/6] octeontx2-af: CN20k basic mbox operations and structures Sai Krishna
2024-10-21  3:30   ` Kalesh Anakkur Purayil
2024-10-21 12:43     ` Sai Krishna Gajula
2024-10-18 20:30 ` [net-next PATCH 3/6] octeontx2-af: CN20k mbox to support AF REQ/ACK functionality Sai Krishna
2024-10-21  3:35   ` Kalesh Anakkur Purayil
2024-10-21 15:33     ` Sai Krishna Gajula
2024-10-18 20:30 ` [net-next PATCH 4/6] octeontx2-pf: CN20K mbox REQ/ACK implementation for NIC PF Sai Krishna
2024-10-21  3:38   ` Kalesh Anakkur Purayil
2024-10-21 15:38     ` Sai Krishna Gajula
2024-10-18 20:30 ` [net-next PATCH 5/6] octeontx2-af: CN20K mbox implementation for AF's VF Sai Krishna
2024-10-18 20:30 ` [net-next PATCH 6/6] octeontx2-pf: CN20K mbox implementation between PF-VF Sai Krishna
2024-10-22  8:19   ` kernel test robot [this message]

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=202410221614.07o9QVjo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=saikrishnag@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®