drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: sparse: incorrect type in argument 2 (different address spaces)
From: kernel test robot
Date: Sun Aug 16 2020 - 16:17:12 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: mips-randconfig-s032-20200817 (attached as .config)
compiler: mips64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-180-g49f7e13a-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:135:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:140:9: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *[assigned] inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:38: sparse: expected void [noderef] __iomem *[assigned] inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:450:38: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:23: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:543:49: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:31: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:57: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:57: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:551:57: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:51: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:553:51: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:51: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:558:51: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:25: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:51: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:561:51: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:603:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:602:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *doorbell_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:602:26: sparse: expected void [noderef] __iomem *doorbell_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:602:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:605:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:604:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:604:26: sparse: expected void [noderef] __iomem *inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:604:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:647:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:646:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_sent_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:646:29: sparse: expected void [noderef] __iomem *pkts_sent_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:646:29: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:649:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:648:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_credit_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:648:31: sparse: expected void [noderef] __iomem *pkts_credit_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:648:31: sparse: got unsigned char [usertype] *
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:688:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:688:42: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:688:42: sparse: got void *mbox_int_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:689:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:689:42: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:689:42: sparse: got void *mbox_int_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:694:54: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:694:54: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:694:54: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:737:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:741:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:745:40: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:755:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:755:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:755:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:990:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:990:42: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:990:42: sparse: got void *mbox_int_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:997:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:997:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c:997:44: sparse: got void *mbox_int_reg
--
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:41: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:38: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *[assigned] inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:38: sparse: expected void [noderef] __iomem *[assigned] inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:121:38: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:226:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:225:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *doorbell_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:225:26: sparse: expected void [noderef] __iomem *doorbell_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:225:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:228:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:227:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *inst_cnt_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:227:26: sparse: expected void [noderef] __iomem *inst_cnt_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:227:26: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:258:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:257:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_sent_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:257:29: sparse: expected void [noderef] __iomem *pkts_sent_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:257:29: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:260:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:259:31: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *pkts_credit_reg @@ got unsigned char [usertype] * @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:259:31: sparse: expected void [noderef] __iomem *pkts_credit_reg
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:259:31: sparse: got unsigned char [usertype] *
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:298:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:301:14: sparse: sparse: cast removes address space '__iomem' of expression
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:304:14: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:313:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:313:36: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:313:36: sparse: got void *mbox_read_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:479:50: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:479:50: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:479:50: sparse: got void *mbox_int_reg
>> drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:480:50: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_int_reg @@
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:480:50: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/cn23xx_vf_device.c:480:50: sparse: got void *mbox_int_reg
--
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:43:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:43:29: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:43:29: sparse: got void *mbox_read_reg
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:81:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:81:52: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:81:52: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:115:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:115:36: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:115:36: sparse: got void *mbox_read_reg
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:163:26: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:163:26: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:163:26: sparse: got void *mbox_write_reg
>> drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:172:47: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:172:47: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:172:47: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:175:42: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:175:42: sparse: expected void const volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:175:42: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:184:63: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_write_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:184:63: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:184:63: sparse: got void *mbox_write_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:193:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:193:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:193:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:305:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:305:52: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:305:52: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:315:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:315:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:315:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:324:44: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:324:44: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:324:44: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:340:52: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:340:52: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:340:52: sparse: got void *mbox_read_reg
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:370:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *mbox_read_reg @@
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:370:36: sparse: expected void volatile [noderef] __iomem *mem
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c:370:36: sparse: got void *mbox_read_reg
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=670d0a4b10704667765f7d18f7592993d02783aa
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
vim +543 drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 474
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 475 static void cn23xx_pf_setup_global_output_regs(struct octeon_device *oct)
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 476 {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 477 u32 reg_val;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 478 u32 q_no, ern, srn;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 479 u64 time_threshold;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 480
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 481 struct octeon_cn23xx_pf *cn23xx = (struct octeon_cn23xx_pf *)oct->chip;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 482
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 483 srn = oct->sriov_info.pf_srn;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 484 ern = srn + oct->sriov_info.num_pf_rings;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 485
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 486 if (CFG_GET_IS_SLI_BP_ON(cn23xx->conf)) {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 487 octeon_write_csr64(oct, CN23XX_SLI_OQ_WMARK, 32);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 488 } else {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 489 /** Set Output queue watermark to 0 to disable backpressure */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 490 octeon_write_csr64(oct, CN23XX_SLI_OQ_WMARK, 0);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 491 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 492
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 493 for (q_no = srn; q_no < ern; q_no++) {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 494 reg_val = octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no));
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 495
ac13d6d8eaded1 Rick Farrington 2018-07-13 496 /* clear IPTR */
ac13d6d8eaded1 Rick Farrington 2018-07-13 497 reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR;
ac13d6d8eaded1 Rick Farrington 2018-07-13 498
c4ee5d8103ed78 Prasad Kanneganti 2017-06-18 499 /* set DPTR */
c4ee5d8103ed78 Prasad Kanneganti 2017-06-18 500 reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 501
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 502 /* reset BMODE */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 503 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_BMODE);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 504
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 505 /* No Relaxed Ordering, No Snoop, 64-bit Byte swap
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 506 * for Output Queue ScatterList
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 507 * reset ROR_P, NSR_P
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 508 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 509 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_ROR_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 510 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_NSR_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 511
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 512 #ifdef __LITTLE_ENDIAN_BITFIELD
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 513 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_ES_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 514 #else
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 515 reg_val |= (CN23XX_PKT_OUTPUT_CTL_ES_P);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 516 #endif
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 517 /* No Relaxed Ordering, No Snoop, 64-bit Byte swap
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 518 * for Output Queue Data
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 519 * reset ROR, NSR
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 520 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 521 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_ROR);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 522 reg_val &= ~(CN23XX_PKT_OUTPUT_CTL_NSR);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 523 /* set the ES bit */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 524 reg_val |= (CN23XX_PKT_OUTPUT_CTL_ES);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 525
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 526 /* write all the selected settings */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 527 octeon_write_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no), reg_val);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 528
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 529 /* Enabling these interrupt in oct->fn_list.enable_interrupt()
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 530 * routine which called after IOQ init.
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 531 * Set up interrupt packet and time thresholds
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 532 * for all the OQs
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 533 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 534 time_threshold = cn23xx_pf_get_oq_ticks(
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 535 oct, (u32)CFG_GET_OQ_INTR_TIME(cn23xx->conf));
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 536
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 537 octeon_write_csr64(oct, CN23XX_SLI_OQ_PKT_INT_LEVELS(q_no),
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 538 (CFG_GET_OQ_INTR_PKT(cn23xx->conf) |
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 539 (time_threshold << 32)));
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 540 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 541
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 542 /** Setting the water mark level for pko back pressure **/
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 @543 writeq(0x40, (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OQ_WMARK);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 544
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 545 /** Disabling setting OQs in reset when ring has no dorebells
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 546 * enabling this will cause of head of line blocking
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 547 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 548 /* Do it only for pass1.1. and pass1.2 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 549 if ((oct->rev_id == OCTEON_CN23XX_REV_1_0) ||
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 550 (oct->rev_id == OCTEON_CN23XX_REV_1_1))
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 @551 writeq(readq((u8 *)oct->mmio[0].hw_addr +
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 552 CN23XX_SLI_GBL_CONTROL) | 0x2,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 553 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_GBL_CONTROL);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 554
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 555 /** Enable channel-level backpressure */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 556 if (oct->pf_num)
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 557 writeq(0xffffffffffffffffULL,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 558 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OUT_BP_EN2_W1S);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 559 else
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 560 writeq(0xffffffffffffffffULL,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 561 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OUT_BP_EN_W1S);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 562 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 563
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 564 static int cn23xx_setup_pf_device_regs(struct octeon_device *oct)
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 565 {
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 566 cn23xx_enable_error_reporting(oct);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 567
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 568 /* program the MAC(0..3)_RINFO before setting up input/output regs */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 569 cn23xx_setup_global_mac_regs(oct);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 570
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 571 if (cn23xx_pf_setup_global_input_regs(oct))
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 572 return -1;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 573
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 574 cn23xx_pf_setup_global_output_regs(oct);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 575
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 576 /* Default error timeout value should be 0x200000 to avoid host hang
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 577 * when reads invalid register
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 578 */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 579 octeon_write_csr64(oct, CN23XX_SLI_WINDOW_CTL,
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 580 CN23XX_SLI_WINDOW_CTL_DEFAULT);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 581
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 582 /* set SLI_PKT_IN_JABBER to handle large VXLAN packets */
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 583 octeon_write_csr64(oct, CN23XX_SLI_PKT_IN_JABBER, CN23XX_INPUT_JABBER);
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 584 return 0;
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 585 }
3451b97cce2d78 Raghu Vatsavayi 2016-08-31 586
72c0091293c008 Raghu Vatsavayi 2016-08-31 587 static void cn23xx_setup_iq_regs(struct octeon_device *oct, u32 iq_no)
72c0091293c008 Raghu Vatsavayi 2016-08-31 588 {
72c0091293c008 Raghu Vatsavayi 2016-08-31 589 struct octeon_instr_queue *iq = oct->instr_queue[iq_no];
72c0091293c008 Raghu Vatsavayi 2016-08-31 590 u64 pkt_in_done;
72c0091293c008 Raghu Vatsavayi 2016-08-31 591
72c0091293c008 Raghu Vatsavayi 2016-08-31 592 iq_no += oct->sriov_info.pf_srn;
72c0091293c008 Raghu Vatsavayi 2016-08-31 593
72c0091293c008 Raghu Vatsavayi 2016-08-31 594 /* Write the start of the input queue's ring and its size */
72c0091293c008 Raghu Vatsavayi 2016-08-31 595 octeon_write_csr64(oct, CN23XX_SLI_IQ_BASE_ADDR64(iq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 596 iq->base_addr_dma);
72c0091293c008 Raghu Vatsavayi 2016-08-31 597 octeon_write_csr(oct, CN23XX_SLI_IQ_SIZE(iq_no), iq->max_count);
72c0091293c008 Raghu Vatsavayi 2016-08-31 598
72c0091293c008 Raghu Vatsavayi 2016-08-31 599 /* Remember the doorbell & instruction count register addr
72c0091293c008 Raghu Vatsavayi 2016-08-31 600 * for this queue
72c0091293c008 Raghu Vatsavayi 2016-08-31 601 */
72c0091293c008 Raghu Vatsavayi 2016-08-31 602 iq->doorbell_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 603 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_IQ_DOORBELL(iq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 604 iq->inst_cnt_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 605 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_IQ_INSTR_COUNT64(iq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 606 dev_dbg(&oct->pci_dev->dev, "InstQ[%d]:dbell reg @ 0x%p instcnt_reg @ 0x%p\n",
72c0091293c008 Raghu Vatsavayi 2016-08-31 607 iq_no, iq->doorbell_reg, iq->inst_cnt_reg);
72c0091293c008 Raghu Vatsavayi 2016-08-31 608
72c0091293c008 Raghu Vatsavayi 2016-08-31 609 /* Store the current instruction counter (used in flush_iq
72c0091293c008 Raghu Vatsavayi 2016-08-31 610 * calculation)
72c0091293c008 Raghu Vatsavayi 2016-08-31 611 */
72c0091293c008 Raghu Vatsavayi 2016-08-31 612 pkt_in_done = readq(iq->inst_cnt_reg);
72c0091293c008 Raghu Vatsavayi 2016-08-31 613
5b07aee11227fa Raghu Vatsavayi 2016-08-31 614 if (oct->msix_on) {
5b07aee11227fa Raghu Vatsavayi 2016-08-31 615 /* Set CINT_ENB to enable IQ interrupt */
5b07aee11227fa Raghu Vatsavayi 2016-08-31 616 writeq((pkt_in_done | CN23XX_INTR_CINT_ENB),
5b07aee11227fa Raghu Vatsavayi 2016-08-31 617 iq->inst_cnt_reg);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 618 } else {
72c0091293c008 Raghu Vatsavayi 2016-08-31 619 /* Clear the count by writing back what we read, but don't
72c0091293c008 Raghu Vatsavayi 2016-08-31 620 * enable interrupts
72c0091293c008 Raghu Vatsavayi 2016-08-31 621 */
72c0091293c008 Raghu Vatsavayi 2016-08-31 622 writeq(pkt_in_done, iq->inst_cnt_reg);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 623 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 624
72c0091293c008 Raghu Vatsavayi 2016-08-31 625 iq->reset_instr_cnt = 0;
72c0091293c008 Raghu Vatsavayi 2016-08-31 626 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 627
72c0091293c008 Raghu Vatsavayi 2016-08-31 628 static void cn23xx_setup_oq_regs(struct octeon_device *oct, u32 oq_no)
72c0091293c008 Raghu Vatsavayi 2016-08-31 629 {
72c0091293c008 Raghu Vatsavayi 2016-08-31 630 u32 reg_val;
72c0091293c008 Raghu Vatsavayi 2016-08-31 631 struct octeon_droq *droq = oct->droq[oq_no];
5b07aee11227fa Raghu Vatsavayi 2016-08-31 632 struct octeon_cn23xx_pf *cn23xx = (struct octeon_cn23xx_pf *)oct->chip;
5b07aee11227fa Raghu Vatsavayi 2016-08-31 633 u64 time_threshold;
5b07aee11227fa Raghu Vatsavayi 2016-08-31 634 u64 cnt_threshold;
72c0091293c008 Raghu Vatsavayi 2016-08-31 635
72c0091293c008 Raghu Vatsavayi 2016-08-31 636 oq_no += oct->sriov_info.pf_srn;
72c0091293c008 Raghu Vatsavayi 2016-08-31 637
72c0091293c008 Raghu Vatsavayi 2016-08-31 638 octeon_write_csr64(oct, CN23XX_SLI_OQ_BASE_ADDR64(oq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 639 droq->desc_ring_dma);
72c0091293c008 Raghu Vatsavayi 2016-08-31 640 octeon_write_csr(oct, CN23XX_SLI_OQ_SIZE(oq_no), droq->max_count);
72c0091293c008 Raghu Vatsavayi 2016-08-31 641
72c0091293c008 Raghu Vatsavayi 2016-08-31 642 octeon_write_csr(oct, CN23XX_SLI_OQ_BUFF_INFO_SIZE(oq_no),
c4ee5d8103ed78 Prasad Kanneganti 2017-06-18 643 droq->buffer_size);
72c0091293c008 Raghu Vatsavayi 2016-08-31 644
72c0091293c008 Raghu Vatsavayi 2016-08-31 645 /* Get the mapped address of the pkt_sent and pkts_credit regs */
72c0091293c008 Raghu Vatsavayi 2016-08-31 646 droq->pkts_sent_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 647 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OQ_PKTS_SENT(oq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 648 droq->pkts_credit_reg =
72c0091293c008 Raghu Vatsavayi 2016-08-31 649 (u8 *)oct->mmio[0].hw_addr + CN23XX_SLI_OQ_PKTS_CREDIT(oq_no);
72c0091293c008 Raghu Vatsavayi 2016-08-31 650
5b07aee11227fa Raghu Vatsavayi 2016-08-31 651 if (!oct->msix_on) {
72c0091293c008 Raghu Vatsavayi 2016-08-31 652 /* Enable this output queue to generate Packet Timer Interrupt
72c0091293c008 Raghu Vatsavayi 2016-08-31 653 */
5b07aee11227fa Raghu Vatsavayi 2016-08-31 654 reg_val =
5b07aee11227fa Raghu Vatsavayi 2016-08-31 655 octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no));
72c0091293c008 Raghu Vatsavayi 2016-08-31 656 reg_val |= CN23XX_PKT_OUTPUT_CTL_TENB;
72c0091293c008 Raghu Vatsavayi 2016-08-31 657 octeon_write_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 658 reg_val);
72c0091293c008 Raghu Vatsavayi 2016-08-31 659
72c0091293c008 Raghu Vatsavayi 2016-08-31 660 /* Enable this output queue to generate Packet Count Interrupt
72c0091293c008 Raghu Vatsavayi 2016-08-31 661 */
5b07aee11227fa Raghu Vatsavayi 2016-08-31 662 reg_val =
5b07aee11227fa Raghu Vatsavayi 2016-08-31 663 octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no));
72c0091293c008 Raghu Vatsavayi 2016-08-31 664 reg_val |= CN23XX_PKT_OUTPUT_CTL_CENB;
72c0091293c008 Raghu Vatsavayi 2016-08-31 665 octeon_write_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(oq_no),
72c0091293c008 Raghu Vatsavayi 2016-08-31 666 reg_val);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 667 } else {
5b07aee11227fa Raghu Vatsavayi 2016-08-31 668 time_threshold = cn23xx_pf_get_oq_ticks(
5b07aee11227fa Raghu Vatsavayi 2016-08-31 669 oct, (u32)CFG_GET_OQ_INTR_TIME(cn23xx->conf));
5b07aee11227fa Raghu Vatsavayi 2016-08-31 670 cnt_threshold = (u32)CFG_GET_OQ_INTR_PKT(cn23xx->conf);
5b07aee11227fa Raghu Vatsavayi 2016-08-31 671
5b07aee11227fa Raghu Vatsavayi 2016-08-31 672 octeon_write_csr64(
5b07aee11227fa Raghu Vatsavayi 2016-08-31 673 oct, CN23XX_SLI_OQ_PKT_INT_LEVELS(oq_no),
5b07aee11227fa Raghu Vatsavayi 2016-08-31 674 ((time_threshold << 32 | cnt_threshold)));
5b07aee11227fa Raghu Vatsavayi 2016-08-31 675 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 676 }
72c0091293c008 Raghu Vatsavayi 2016-08-31 677
5d65556beb3668 Raghu Vatsavayi 2016-11-14 678 static void cn23xx_pf_mbox_thread(struct work_struct *work)
5d65556beb3668 Raghu Vatsavayi 2016-11-14 679 {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 680 struct cavium_wk *wk = (struct cavium_wk *)work;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 681 struct octeon_mbox *mbox = (struct octeon_mbox *)wk->ctxptr;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 682 struct octeon_device *oct = mbox->oct_dev;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 683 u64 mbox_int_val, val64;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 684 u32 q_no, i;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 685
5d65556beb3668 Raghu Vatsavayi 2016-11-14 686 if (oct->rev_id < OCTEON_CN23XX_REV_1_1) {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 687 /*read and clear by writing 1*/
5d65556beb3668 Raghu Vatsavayi 2016-11-14 @688 mbox_int_val = readq(mbox->mbox_int_reg);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 @689 writeq(mbox_int_val, mbox->mbox_int_reg);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 690
5d65556beb3668 Raghu Vatsavayi 2016-11-14 691 for (i = 0; i < oct->sriov_info.num_vfs_alloced; i++) {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 692 q_no = i * oct->sriov_info.rings_per_vf;
5d65556beb3668 Raghu Vatsavayi 2016-11-14 693
5d65556beb3668 Raghu Vatsavayi 2016-11-14 @694 val64 = readq(oct->mbox[q_no]->mbox_write_reg);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 695
5d65556beb3668 Raghu Vatsavayi 2016-11-14 696 if (val64 && (val64 != OCTEON_PFVFACK)) {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 697 if (octeon_mbox_read(oct->mbox[q_no]))
5d65556beb3668 Raghu Vatsavayi 2016-11-14 698 octeon_mbox_process_message(
5d65556beb3668 Raghu Vatsavayi 2016-11-14 699 oct->mbox[q_no]);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 700 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 701 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 702
5d65556beb3668 Raghu Vatsavayi 2016-11-14 703 schedule_delayed_work(&wk->work, msecs_to_jiffies(10));
5d65556beb3668 Raghu Vatsavayi 2016-11-14 704 } else {
5d65556beb3668 Raghu Vatsavayi 2016-11-14 705 octeon_mbox_process_message(mbox);
5d65556beb3668 Raghu Vatsavayi 2016-11-14 706 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 707 }
5d65556beb3668 Raghu Vatsavayi 2016-11-14 708
:::::: The code at line 543 was first introduced by commit
:::::: 3451b97cce2d7827bd76378ae6e9aeb7e8fc463d liquidio: CN23XX register setup
:::::: TO: Raghu Vatsavayi <rvatsavayi@xxxxxxxxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip