arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 MIPS: uaccess: Reduce number of nested macros
date: 5 weeks ago
config: mips-randconfig-s032-20210519 (attached as .config)
compiler: mipsel-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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ddb002d6d6af12c45dd9d565cadf0f40b36b7c25
# 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__' W=1 ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
command-line: note: in included file:
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQUIRE redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_SEQ_CST redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_ACQ_REL redefined
builtin:0:0: sparse: this was the original definition
builtin:1:9: sparse: sparse: preprocessor token __ATOMIC_RELEASE redefined
builtin:0:0: sparse: this was the original definition
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const [noderef] __user *p @@ got char *buf @@
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: expected void const [noderef] __user *p
arch/mips/sibyte/common/sb_tbprof.c:449:14: sparse: got char *buf
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __user *to @@ got char *dest @@
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: expected void [noderef] __user *to
arch/mips/sibyte/common/sb_tbprof.c:464:38: sparse: got char *dest
>> arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected int [noderef] __user *__p @@ got int * @@
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: expected int [noderef] __user *__p
arch/mips/sibyte/common/sb_tbprof.c:515:23: sparse: got int *
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: sparse: incorrect type in initializer (incompatible argument 2 (different address spaces)) @@ expected int ( *read )( ... ) @@ got int ( * )( ... ) @@
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: expected int ( *read )( ... )
arch/mips/sibyte/common/sb_tbprof.c:531:27: sparse: got int ( * )( ... )
vim +515 arch/mips/sibyte/common/sb_tbprof.c
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 439
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 440 static ssize_t sbprof_tb_read(struct file *filp, char *buf,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 441 size_t size, loff_t *offp)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 442 {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 443 int cur_sample, sample_off, cur_count, sample_left;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 444 char *src;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 445 int count = 0;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 446 char *dest = buf;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 447 long cur_off = *offp;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 448
96d4f267e40f95 arch/mips/sibyte/common/sb_tbprof.c Linus Torvalds 2019-01-03 @449 if (!access_ok(buf, size))
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 450 return -EFAULT;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 451
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 452 mutex_lock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 453
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 454 count = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 455 cur_sample = cur_off / TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 456 sample_off = cur_off % TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 457 sample_left = TB_SAMPLE_SIZE - sample_off;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 458
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 459 while (size && (cur_sample < sbp.next_tb_sample)) {
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 460 int err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 461
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 462 cur_count = size < sample_left ? size : sample_left;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 463 src = (char *)(((long)sbp.sbprof_tbbuf[cur_sample])+sample_off);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 464 err = __copy_to_user(dest, src, cur_count);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 465 if (err) {
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 466 *offp = cur_off + cur_count - err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 467 mutex_unlock(&sbp.lock);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 468 return err;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 469 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 470 pr_debug(DEVNAME ": read from sample %d, %d bytes\n",
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 471 cur_sample, cur_count);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 472 size -= cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 473 sample_left -= cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 474 if (!sample_left) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 475 cur_sample++;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 476 sample_off = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 477 sample_left = TB_SAMPLE_SIZE;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 478 } else {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 479 sample_off += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 480 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 481 cur_off += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 482 dest += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 483 count += cur_count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 484 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 485 *offp = cur_off;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 486 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 487
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 488 return count;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 489 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 490
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 491 static long sbprof_tb_ioctl(struct file *filp,
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 492 unsigned int command,
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 493 unsigned long arg)
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 494 {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 495 int err = 0;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 496
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 497 switch (command) {
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 498 case SBPROF_ZBSTART:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 499 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 500 err = sbprof_zbprof_start(filp);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 501 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 502 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 503
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 504 case SBPROF_ZBSTOP:
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 505 mutex_lock(&sbp.lock);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 506 err = sbprof_zbprof_stop();
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 507 mutex_unlock(&sbp.lock);
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 508 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 509
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 510 case SBPROF_ZBWAITFULL: {
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 511 err = wait_event_interruptible(sbp.tb_read, TB_FULL);
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 512 if (err)
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 513 break;
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 514
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 @515 err = put_user(TB_FULL, (int *) arg);
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 516 break;
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 517 }
bb9b813bb665cd arch/mips/sibyte/sb1250/bcm1250_tbprof.c Ralf Baechle 2007-03-09 518
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 519 default:
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 520 err = -EINVAL;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 521 break;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 522 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 523
d619f38fdacb5c arch/mips/sibyte/common/sb_tbprof.c Mark Mason 2007-03-29 524 return err;
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 525 }
^1da177e4c3f41 arch/mips/sibyte/sb1250/bcm1250_tbprof.c Linus Torvalds 2005-04-16 526
:::::: The code at line 515 was first introduced by commit
:::::: d619f38fdacb5cec0c841798bbadeaf903868852 [MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
:::::: TO: Mark Mason <mmason(a)upwardaccess.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
arch/powerpc/platforms/powernv/opal-core.c:476:58: sparse: sparse: incorrect type in argument 2 (different base types)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: d936f8182e1bd18f5e9e6c5e8d8b69261200ca96 powerpc/powernv: Fix type of opal_mpipl_query_tag() addr argument
date: 4 weeks ago
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-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.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d936f8182e1bd18f5e9e6c5e8d8b69261200ca96
# 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__' W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
arch/powerpc/platforms/powernv/opal-core.c:99:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] n_namesz @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:99:24: sparse: expected unsigned int [usertype] n_namesz
arch/powerpc/platforms/powernv/opal-core.c:99:24: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:100:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] n_descsz @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:100:24: sparse: expected unsigned int [usertype] n_descsz
arch/powerpc/platforms/powernv/opal-core.c:100:24: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:101:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] n_type @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:101:24: sparse: expected unsigned int [usertype] n_type
arch/powerpc/platforms/powernv/opal-core.c:101:24: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:122:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected int [usertype] pr_pid @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:122:34: sparse: expected int [usertype] pr_pid
arch/powerpc/platforms/powernv/opal-core.c:122:34: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:123:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected int [usertype] pr_ppid @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:123:34: sparse: expected int [usertype] pr_ppid
arch/powerpc/platforms/powernv/opal-core.c:123:34: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:133:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected short pr_cursig @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:133:44: sparse: expected short pr_cursig
arch/powerpc/platforms/powernv/opal-core.c:133:44: sparse: got restricted __be16 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:146:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:146:21: sparse: expected unsigned long long [usertype]
arch/powerpc/platforms/powernv/opal-core.c:146:21: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:147:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:147:21: sparse: expected unsigned long long [usertype]
arch/powerpc/platforms/powernv/opal-core.c:147:21: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:150:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:150:21: sparse: expected unsigned long long [usertype]
arch/powerpc/platforms/powernv/opal-core.c:150:21: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:277:17: sparse: sparse: cast to restricted __be64
arch/powerpc/platforms/powernv/opal-core.c:277:17: sparse: sparse: cast to restricted __be64
arch/powerpc/platforms/powernv/opal-core.c:363:21: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] e_type @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:363:21: sparse: expected unsigned short [usertype] e_type
arch/powerpc/platforms/powernv/opal-core.c:363:21: sparse: got restricted __be16 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:364:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] e_machine @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:364:24: sparse: expected unsigned short [usertype] e_machine
arch/powerpc/platforms/powernv/opal-core.c:364:24: sparse: got restricted __be16 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:365:24: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] e_version @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:365:24: sparse: expected unsigned int [usertype] e_version
arch/powerpc/platforms/powernv/opal-core.c:365:24: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:367:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] e_phoff @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:367:22: sparse: expected unsigned long long [usertype] e_phoff
arch/powerpc/platforms/powernv/opal-core.c:367:22: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:371:23: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] e_ehsize @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:371:23: sparse: expected unsigned short [usertype] e_ehsize
arch/powerpc/platforms/powernv/opal-core.c:371:23: sparse: got restricted __be16 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:372:26: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] e_phentsize @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:372:26: sparse: expected unsigned short [usertype] e_phentsize
arch/powerpc/platforms/powernv/opal-core.c:372:26: sparse: got restricted __be16 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:380:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] p_type @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:380:25: sparse: expected unsigned int [usertype] p_type
arch/powerpc/platforms/powernv/opal-core.c:380:25: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:384:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] p_offset @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:384:25: sparse: expected unsigned long long [usertype] p_offset
arch/powerpc/platforms/powernv/opal-core.c:384:25: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:385:41: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] p_memsz @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:385:41: sparse: expected unsigned long long [usertype] p_memsz
arch/powerpc/platforms/powernv/opal-core.c:385:41: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:394:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] p_type @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:394:33: sparse: expected unsigned int [usertype] p_type
arch/powerpc/platforms/powernv/opal-core.c:394:33: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:395:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] p_flags @@ got restricted __be32 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:395:33: sparse: expected unsigned int [usertype] p_flags
arch/powerpc/platforms/powernv/opal-core.c:395:33: sparse: got restricted __be32 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:406:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] p_paddr @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:406:33: sparse: expected unsigned long long [usertype] p_paddr
arch/powerpc/platforms/powernv/opal-core.c:406:33: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:407:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] p_vaddr @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:407:33: sparse: expected unsigned long long [usertype] p_vaddr
arch/powerpc/platforms/powernv/opal-core.c:407:33: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:408:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] p_memsz @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:408:50: sparse: expected unsigned long long [usertype] p_memsz
arch/powerpc/platforms/powernv/opal-core.c:408:50: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:410:33: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] p_offset @@ got restricted __be64 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:410:33: sparse: expected unsigned long long [usertype] p_offset
arch/powerpc/platforms/powernv/opal-core.c:410:33: sparse: got restricted __be64 [usertype]
arch/powerpc/platforms/powernv/opal-core.c:417:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] e_phnum @@ got restricted __be16 [usertype] @@
arch/powerpc/platforms/powernv/opal-core.c:417:22: sparse: expected unsigned short [usertype] e_phnum
arch/powerpc/platforms/powernv/opal-core.c:417:22: sparse: got restricted __be16 [usertype]
>> arch/powerpc/platforms/powernv/opal-core.c:476:58: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be64 [usertype] *addr @@ got unsigned long long * @@
arch/powerpc/platforms/powernv/opal-core.c:476:58: sparse: expected restricted __be64 [usertype] *addr
arch/powerpc/platforms/powernv/opal-core.c:476:58: sparse: got unsigned long long *
arch/powerpc/platforms/powernv/opal-core.c:482:16: sparse: sparse: cast to restricted __be64
arch/powerpc/platforms/powernv/opal-core.c:487:57: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected restricted __be64 [usertype] *addr @@ got unsigned long long * @@
arch/powerpc/platforms/powernv/opal-core.c:487:57: sparse: expected restricted __be64 [usertype] *addr
arch/powerpc/platforms/powernv/opal-core.c:487:57: sparse: got unsigned long long *
arch/powerpc/platforms/powernv/opal-core.c:493:16: sparse: sparse: cast to restricted __be64
arch/powerpc/platforms/powernv/opal-core.c: note: in included file:
arch/powerpc/platforms/powernv/opal-fadump.h:138:33: sparse: sparse: restricted __be64 degrades to integer
vim +476 arch/powerpc/platforms/powernv/opal-core.c
6f713d18144ce8 Hari Bathini 2019-09-11 450
6f713d18144ce8 Hari Bathini 2019-09-11 451 static void __init opalcore_config_init(void)
6f713d18144ce8 Hari Bathini 2019-09-11 452 {
6f713d18144ce8 Hari Bathini 2019-09-11 453 u32 idx, cpu_data_version;
6f713d18144ce8 Hari Bathini 2019-09-11 454 struct device_node *np;
6f713d18144ce8 Hari Bathini 2019-09-11 455 const __be32 *prop;
6f713d18144ce8 Hari Bathini 2019-09-11 456 u64 addr = 0;
6f713d18144ce8 Hari Bathini 2019-09-11 457 int i, ret;
6f713d18144ce8 Hari Bathini 2019-09-11 458
6f713d18144ce8 Hari Bathini 2019-09-11 459 np = of_find_node_by_path("/ibm,opal/dump");
6f713d18144ce8 Hari Bathini 2019-09-11 460 if (np == NULL)
6f713d18144ce8 Hari Bathini 2019-09-11 461 return;
6f713d18144ce8 Hari Bathini 2019-09-11 462
6f713d18144ce8 Hari Bathini 2019-09-11 463 if (!of_device_is_compatible(np, "ibm,opal-dump")) {
6f713d18144ce8 Hari Bathini 2019-09-11 464 pr_warn("Support missing for this f/w version!\n");
6f713d18144ce8 Hari Bathini 2019-09-11 465 return;
6f713d18144ce8 Hari Bathini 2019-09-11 466 }
6f713d18144ce8 Hari Bathini 2019-09-11 467
6f713d18144ce8 Hari Bathini 2019-09-11 468 /* Check if dump has been initiated on last reboot */
6f713d18144ce8 Hari Bathini 2019-09-11 469 prop = of_get_property(np, "mpipl-boot", NULL);
6f713d18144ce8 Hari Bathini 2019-09-11 470 if (!prop) {
6f713d18144ce8 Hari Bathini 2019-09-11 471 of_node_put(np);
6f713d18144ce8 Hari Bathini 2019-09-11 472 return;
6f713d18144ce8 Hari Bathini 2019-09-11 473 }
6f713d18144ce8 Hari Bathini 2019-09-11 474
6f713d18144ce8 Hari Bathini 2019-09-11 475 /* Get OPAL metadata */
6f713d18144ce8 Hari Bathini 2019-09-11 @476 ret = opal_mpipl_query_tag(OPAL_MPIPL_TAG_OPAL, &addr);
6f713d18144ce8 Hari Bathini 2019-09-11 477 if ((ret != OPAL_SUCCESS) || !addr) {
6f713d18144ce8 Hari Bathini 2019-09-11 478 pr_err("Failed to get OPAL metadata (%d)\n", ret);
6f713d18144ce8 Hari Bathini 2019-09-11 479 goto error_out;
6f713d18144ce8 Hari Bathini 2019-09-11 480 }
6f713d18144ce8 Hari Bathini 2019-09-11 481
6f713d18144ce8 Hari Bathini 2019-09-11 482 addr = be64_to_cpu(addr);
6f713d18144ce8 Hari Bathini 2019-09-11 483 pr_debug("OPAL metadata addr: %llx\n", addr);
6f713d18144ce8 Hari Bathini 2019-09-11 484 opalc_metadata = __va(addr);
6f713d18144ce8 Hari Bathini 2019-09-11 485
6f713d18144ce8 Hari Bathini 2019-09-11 486 /* Get OPAL CPU metadata */
6f713d18144ce8 Hari Bathini 2019-09-11 487 ret = opal_mpipl_query_tag(OPAL_MPIPL_TAG_CPU, &addr);
6f713d18144ce8 Hari Bathini 2019-09-11 488 if ((ret != OPAL_SUCCESS) || !addr) {
6f713d18144ce8 Hari Bathini 2019-09-11 489 pr_err("Failed to get OPAL CPU metadata (%d)\n", ret);
6f713d18144ce8 Hari Bathini 2019-09-11 490 goto error_out;
6f713d18144ce8 Hari Bathini 2019-09-11 491 }
6f713d18144ce8 Hari Bathini 2019-09-11 492
6f713d18144ce8 Hari Bathini 2019-09-11 493 addr = be64_to_cpu(addr);
6f713d18144ce8 Hari Bathini 2019-09-11 494 pr_debug("CPU metadata addr: %llx\n", addr);
6f713d18144ce8 Hari Bathini 2019-09-11 495 opalc_cpu_metadata = __va(addr);
6f713d18144ce8 Hari Bathini 2019-09-11 496
6f713d18144ce8 Hari Bathini 2019-09-11 497 /* Allocate memory for config buffer */
6f713d18144ce8 Hari Bathini 2019-09-11 498 oc_conf = kzalloc(sizeof(struct opalcore_config), GFP_KERNEL);
6f713d18144ce8 Hari Bathini 2019-09-11 499 if (oc_conf == NULL)
6f713d18144ce8 Hari Bathini 2019-09-11 500 goto error_out;
6f713d18144ce8 Hari Bathini 2019-09-11 501
6f713d18144ce8 Hari Bathini 2019-09-11 502 /* Parse OPAL metadata */
6f713d18144ce8 Hari Bathini 2019-09-11 503 if (opalc_metadata->version != OPAL_MPIPL_VERSION) {
6f713d18144ce8 Hari Bathini 2019-09-11 504 pr_warn("Supported OPAL metadata version: %u, found: %u!\n",
6f713d18144ce8 Hari Bathini 2019-09-11 505 OPAL_MPIPL_VERSION, opalc_metadata->version);
6f713d18144ce8 Hari Bathini 2019-09-11 506 pr_warn("WARNING: F/W using newer OPAL metadata format!!\n");
6f713d18144ce8 Hari Bathini 2019-09-11 507 }
6f713d18144ce8 Hari Bathini 2019-09-11 508
6f713d18144ce8 Hari Bathini 2019-09-11 509 oc_conf->ptload_cnt = 0;
6f713d18144ce8 Hari Bathini 2019-09-11 510 idx = be32_to_cpu(opalc_metadata->region_cnt);
6f713d18144ce8 Hari Bathini 2019-09-11 511 if (idx > MAX_PT_LOAD_CNT) {
6f713d18144ce8 Hari Bathini 2019-09-11 512 pr_warn("WARNING: OPAL regions count (%d) adjusted to limit (%d)",
8ec5cb12cd957e Qinglang Miao 2020-09-16 513 idx, MAX_PT_LOAD_CNT);
6f713d18144ce8 Hari Bathini 2019-09-11 514 idx = MAX_PT_LOAD_CNT;
6f713d18144ce8 Hari Bathini 2019-09-11 515 }
6f713d18144ce8 Hari Bathini 2019-09-11 516 for (i = 0; i < idx; i++) {
6f713d18144ce8 Hari Bathini 2019-09-11 517 oc_conf->ptload_addr[oc_conf->ptload_cnt] =
6f713d18144ce8 Hari Bathini 2019-09-11 518 be64_to_cpu(opalc_metadata->region[i].dest);
6f713d18144ce8 Hari Bathini 2019-09-11 519 oc_conf->ptload_size[oc_conf->ptload_cnt++] =
6f713d18144ce8 Hari Bathini 2019-09-11 520 be64_to_cpu(opalc_metadata->region[i].size);
6f713d18144ce8 Hari Bathini 2019-09-11 521 }
6f713d18144ce8 Hari Bathini 2019-09-11 522 oc_conf->ptload_cnt = i;
6f713d18144ce8 Hari Bathini 2019-09-11 523 oc_conf->crashing_cpu = be32_to_cpu(opalc_metadata->crashing_pir);
6f713d18144ce8 Hari Bathini 2019-09-11 524
6f713d18144ce8 Hari Bathini 2019-09-11 525 if (!oc_conf->ptload_cnt) {
6f713d18144ce8 Hari Bathini 2019-09-11 526 pr_err("OPAL memory regions not found\n");
6f713d18144ce8 Hari Bathini 2019-09-11 527 goto error_out;
6f713d18144ce8 Hari Bathini 2019-09-11 528 }
6f713d18144ce8 Hari Bathini 2019-09-11 529
6f713d18144ce8 Hari Bathini 2019-09-11 530 /* Parse OPAL CPU metadata */
6f713d18144ce8 Hari Bathini 2019-09-11 531 cpu_data_version = be32_to_cpu(opalc_cpu_metadata->cpu_data_version);
6f713d18144ce8 Hari Bathini 2019-09-11 532 if (cpu_data_version != HDAT_FADUMP_CPU_DATA_VER) {
6f713d18144ce8 Hari Bathini 2019-09-11 533 pr_warn("Supported CPU data version: %u, found: %u!\n",
6f713d18144ce8 Hari Bathini 2019-09-11 534 HDAT_FADUMP_CPU_DATA_VER, cpu_data_version);
6f713d18144ce8 Hari Bathini 2019-09-11 535 pr_warn("WARNING: F/W using newer CPU state data format!!\n");
6f713d18144ce8 Hari Bathini 2019-09-11 536 }
6f713d18144ce8 Hari Bathini 2019-09-11 537
6f713d18144ce8 Hari Bathini 2019-09-11 538 addr = be64_to_cpu(opalc_cpu_metadata->region[0].dest);
6f713d18144ce8 Hari Bathini 2019-09-11 539 if (!addr) {
6f713d18144ce8 Hari Bathini 2019-09-11 540 pr_err("CPU state data not found!\n");
6f713d18144ce8 Hari Bathini 2019-09-11 541 goto error_out;
6f713d18144ce8 Hari Bathini 2019-09-11 542 }
6f713d18144ce8 Hari Bathini 2019-09-11 543 oc_conf->cpu_state_destination_vaddr = (u64)__va(addr);
6f713d18144ce8 Hari Bathini 2019-09-11 544
6f713d18144ce8 Hari Bathini 2019-09-11 545 oc_conf->cpu_state_data_size =
6f713d18144ce8 Hari Bathini 2019-09-11 546 be64_to_cpu(opalc_cpu_metadata->region[0].size);
6f713d18144ce8 Hari Bathini 2019-09-11 547 oc_conf->cpu_state_entry_size =
6f713d18144ce8 Hari Bathini 2019-09-11 548 be32_to_cpu(opalc_cpu_metadata->cpu_data_size);
6f713d18144ce8 Hari Bathini 2019-09-11 549
6f713d18144ce8 Hari Bathini 2019-09-11 550 if ((oc_conf->cpu_state_entry_size == 0) ||
6f713d18144ce8 Hari Bathini 2019-09-11 551 (oc_conf->cpu_state_entry_size > oc_conf->cpu_state_data_size)) {
6f713d18144ce8 Hari Bathini 2019-09-11 552 pr_err("CPU state data is invalid.\n");
6f713d18144ce8 Hari Bathini 2019-09-11 553 goto error_out;
6f713d18144ce8 Hari Bathini 2019-09-11 554 }
6f713d18144ce8 Hari Bathini 2019-09-11 555 oc_conf->num_cpus = (oc_conf->cpu_state_data_size /
6f713d18144ce8 Hari Bathini 2019-09-11 556 oc_conf->cpu_state_entry_size);
6f713d18144ce8 Hari Bathini 2019-09-11 557
6f713d18144ce8 Hari Bathini 2019-09-11 558 of_node_put(np);
6f713d18144ce8 Hari Bathini 2019-09-11 559 return;
6f713d18144ce8 Hari Bathini 2019-09-11 560
6f713d18144ce8 Hari Bathini 2019-09-11 561 error_out:
6f713d18144ce8 Hari Bathini 2019-09-11 562 pr_err("Could not export /sys/firmware/opal/core\n");
6f713d18144ce8 Hari Bathini 2019-09-11 563 opalcore_cleanup();
6f713d18144ce8 Hari Bathini 2019-09-11 564 of_node_put(np);
6f713d18144ce8 Hari Bathini 2019-09-11 565 }
6f713d18144ce8 Hari Bathini 2019-09-11 566
:::::: The code at line 476 was first introduced by commit
:::::: 6f713d18144ce86c9f01cdf64222d6339e26129e powerpc/opalcore: export /sys/firmware/opal/core for analysing opal crashes
:::::: TO: Hari Bathini <hbathini(a)linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[peterz-queue:sched/cleanup 4/4] kernel/rcu/tree.c:1384:5: error: implicit declaration of function 'irq_work_queue_remote'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/cleanup
head: d0d4a5f96d34a566df77b86f4d1d76ce688c1abc
commit: d0d4a5f96d34a566df77b86f4d1d76ce688c1abc [4/4] rcu/tree: Use irq_work_queue_remote()
config: x86_64-randconfig-a015-20210518 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ceb1ac9812cb0972cfa34cecc5e5704ae2a22063)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/cleanup
git checkout d0d4a5f96d34a566df77b86f4d1d76ce688c1abc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> kernel/rcu/tree.c:1384:5: error: implicit declaration of function 'irq_work_queue_remote' [-Werror,-Wimplicit-function-declaration]
irq_work_queue_remote(rdp->cpu, &rdp->rcu_iw);
^
kernel/rcu/tree.c:1384:5: note: did you mean 'irq_work_queue_on'?
include/linux/irq_work.h:52:6: note: 'irq_work_queue_on' declared here
bool irq_work_queue_on(struct irq_work *work, int cpu);
^
1 error generated.
vim +/irq_work_queue_remote +1384 kernel/rcu/tree.c
1259
1260 /*
1261 * Return true if the specified CPU has passed through a quiescent
1262 * state by virtue of being in or having passed through an dynticks
1263 * idle state since the last call to dyntick_save_progress_counter()
1264 * for this same CPU, or by virtue of having been offline.
1265 */
1266 static int rcu_implicit_dynticks_qs(struct rcu_data *rdp)
1267 {
1268 unsigned long jtsq;
1269 bool *rnhqp;
1270 bool *ruqp;
1271 struct rcu_node *rnp = rdp->mynode;
1272
1273 raw_lockdep_assert_held_rcu_node(rnp);
1274
1275 /*
1276 * If the CPU passed through or entered a dynticks idle phase with
1277 * no active irq/NMI handlers, then we can safely pretend that the CPU
1278 * already acknowledged the request to pass through a quiescent
1279 * state. Either way, that CPU cannot possibly be in an RCU
1280 * read-side critical section that started before the beginning
1281 * of the current RCU grace period.
1282 */
1283 if (rcu_dynticks_in_eqs_since(rdp, rdp->dynticks_snap)) {
1284 trace_rcu_fqs(rcu_state.name, rdp->gp_seq, rdp->cpu, TPS("dti"));
1285 rcu_gpnum_ovf(rnp, rdp);
1286 return 1;
1287 }
1288
1289 /*
1290 * Complain if a CPU that is considered to be offline from RCU's
1291 * perspective has not yet reported a quiescent state. After all,
1292 * the offline CPU should have reported a quiescent state during
1293 * the CPU-offline process, or, failing that, by rcu_gp_init()
1294 * if it ran concurrently with either the CPU going offline or the
1295 * last task on a leaf rcu_node structure exiting its RCU read-side
1296 * critical section while all CPUs corresponding to that structure
1297 * are offline. This added warning detects bugs in any of these
1298 * code paths.
1299 *
1300 * The rcu_node structure's ->lock is held here, which excludes
1301 * the relevant portions the CPU-hotplug code, the grace-period
1302 * initialization code, and the rcu_read_unlock() code paths.
1303 *
1304 * For more detail, please refer to the "Hotplug CPU" section
1305 * of RCU's Requirements documentation.
1306 */
1307 if (WARN_ON_ONCE(!(rdp->grpmask & rcu_rnp_online_cpus(rnp)))) {
1308 bool onl;
1309 struct rcu_node *rnp1;
1310
1311 pr_info("%s: grp: %d-%d level: %d ->gp_seq %ld ->completedqs %ld\n",
1312 __func__, rnp->grplo, rnp->grphi, rnp->level,
1313 (long)rnp->gp_seq, (long)rnp->completedqs);
1314 for (rnp1 = rnp; rnp1; rnp1 = rnp1->parent)
1315 pr_info("%s: %d:%d ->qsmask %#lx ->qsmaskinit %#lx ->qsmaskinitnext %#lx ->rcu_gp_init_mask %#lx\n",
1316 __func__, rnp1->grplo, rnp1->grphi, rnp1->qsmask, rnp1->qsmaskinit, rnp1->qsmaskinitnext, rnp1->rcu_gp_init_mask);
1317 onl = !!(rdp->grpmask & rcu_rnp_online_cpus(rnp));
1318 pr_info("%s %d: %c online: %ld(%d) offline: %ld(%d)\n",
1319 __func__, rdp->cpu, ".o"[onl],
1320 (long)rdp->rcu_onl_gp_seq, rdp->rcu_onl_gp_flags,
1321 (long)rdp->rcu_ofl_gp_seq, rdp->rcu_ofl_gp_flags);
1322 return 1; /* Break things loose after complaining. */
1323 }
1324
1325 /*
1326 * A CPU running for an extended time within the kernel can
1327 * delay RCU grace periods: (1) At age jiffies_to_sched_qs,
1328 * set .rcu_urgent_qs, (2) At age 2*jiffies_to_sched_qs, set
1329 * both .rcu_need_heavy_qs and .rcu_urgent_qs. Note that the
1330 * unsynchronized assignments to the per-CPU rcu_need_heavy_qs
1331 * variable are safe because the assignments are repeated if this
1332 * CPU failed to pass through a quiescent state. This code
1333 * also checks .jiffies_resched in case jiffies_to_sched_qs
1334 * is set way high.
1335 */
1336 jtsq = READ_ONCE(jiffies_to_sched_qs);
1337 ruqp = per_cpu_ptr(&rcu_data.rcu_urgent_qs, rdp->cpu);
1338 rnhqp = &per_cpu(rcu_data.rcu_need_heavy_qs, rdp->cpu);
1339 if (!READ_ONCE(*rnhqp) &&
1340 (time_after(jiffies, rcu_state.gp_start + jtsq * 2) ||
1341 time_after(jiffies, rcu_state.jiffies_resched) ||
1342 rcu_state.cbovld)) {
1343 WRITE_ONCE(*rnhqp, true);
1344 /* Store rcu_need_heavy_qs before rcu_urgent_qs. */
1345 smp_store_release(ruqp, true);
1346 } else if (time_after(jiffies, rcu_state.gp_start + jtsq)) {
1347 WRITE_ONCE(*ruqp, true);
1348 }
1349
1350 /*
1351 * NO_HZ_FULL CPUs can run in-kernel without rcu_sched_clock_irq!
1352 * The above code handles this, but only for straight cond_resched().
1353 * And some in-kernel loops check need_resched() before calling
1354 * cond_resched(), which defeats the above code for CPUs that are
1355 * running in-kernel with scheduling-clock interrupts disabled.
1356 * So hit them over the head with the resched_cpu() hammer!
1357 */
1358 if (tick_nohz_full_cpu(rdp->cpu) &&
1359 (time_after(jiffies, READ_ONCE(rdp->last_fqs_resched) + jtsq * 3) ||
1360 rcu_state.cbovld)) {
1361 WRITE_ONCE(*ruqp, true);
1362 resched_cpu(rdp->cpu);
1363 WRITE_ONCE(rdp->last_fqs_resched, jiffies);
1364 }
1365
1366 /*
1367 * If more than halfway to RCU CPU stall-warning time, invoke
1368 * resched_cpu() more frequently to try to loosen things up a bit.
1369 * Also check to see if the CPU is getting hammered with interrupts,
1370 * but only once per grace period, just to keep the IPIs down to
1371 * a dull roar.
1372 */
1373 if (time_after(jiffies, rcu_state.jiffies_resched)) {
1374 if (time_after(jiffies,
1375 READ_ONCE(rdp->last_fqs_resched) + jtsq)) {
1376 resched_cpu(rdp->cpu);
1377 WRITE_ONCE(rdp->last_fqs_resched, jiffies);
1378 }
1379 if (!rdp->rcu_iw_pending && rdp->rcu_iw_gp_seq != rnp->gp_seq &&
1380 (rnp->ffmask & rdp->grpmask)) {
1381 rdp->rcu_iw_gp_seq = rnp->gp_seq;
1382 if (likely(rdp->cpu != smp_processor_id())) {
1383 rdp->rcu_iw_pending = true;
> 1384 irq_work_queue_remote(rdp->cpu, &rdp->rcu_iw);
1385 }
1386 }
1387 }
1388
1389 return 0;
1390 }
1391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
drivers/net/ethernet/google/gve/gve_tx.c:507:25: warning: variable 'buf' set but not used
by kernel test robot
Hi Catherine,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 6f007c6486d69967ac1d9e67df9ae9c77d49f1cc gve: Add support for raw addressing in the tx path
date: 5 months ago
config: i386-randconfig-r035-20210519 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 6f007c6486d69967ac1d9e67df9ae9c77d49f1cc
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/google/gve/gve_tx.c: In function 'gve_tx_add_skb_no_copy':
>> drivers/net/ethernet/google/gve/gve_tx.c:507:25: warning: variable 'buf' set but not used [-Wunused-but-set-variable]
507 | struct gve_tx_dma_buf *buf;
| ^~~
vim +/buf +507 drivers/net/ethernet/google/gve/gve_tx.c
497
498 static int gve_tx_add_skb_no_copy(struct gve_priv *priv, struct gve_tx_ring *tx,
499 struct sk_buff *skb)
500 {
501 const struct skb_shared_info *shinfo = skb_shinfo(skb);
502 int hlen, payload_nfrags, l4_hdr_offset;
503 union gve_tx_desc *pkt_desc, *seg_desc;
504 struct gve_tx_buffer_state *info;
505 bool is_gso = skb_is_gso(skb);
506 u32 idx = tx->req & tx->mask;
> 507 struct gve_tx_dma_buf *buf;
508 u64 addr;
509 u32 len;
510 int i;
511
512 info = &tx->info[idx];
513 pkt_desc = &tx->desc[idx];
514
515 l4_hdr_offset = skb_checksum_start_offset(skb);
516 /* If the skb is gso, then we want only up to the tcp header in the first segment
517 * to efficiently replicate on each segment otherwise we want the linear portion
518 * of the skb (which will contain the checksum because skb->csum_start and
519 * skb->csum_offset are given relative to skb->head) in the first segment.
520 */
521 hlen = is_gso ? l4_hdr_offset + tcp_hdrlen(skb) : skb_headlen(skb);
522 len = skb_headlen(skb);
523
524 info->skb = skb;
525
526 addr = dma_map_single(tx->dev, skb->data, len, DMA_TO_DEVICE);
527 if (unlikely(dma_mapping_error(tx->dev, addr))) {
528 tx->dma_mapping_error++;
529 goto drop;
530 }
531 buf = &info->buf;
532 dma_unmap_len_set(buf, len, len);
533 dma_unmap_addr_set(buf, dma, addr);
534
535 payload_nfrags = shinfo->nr_frags;
536 if (hlen < len) {
537 /* For gso the rest of the linear portion of the skb needs to
538 * be in its own descriptor.
539 */
540 payload_nfrags++;
541 gve_tx_fill_pkt_desc(pkt_desc, skb, is_gso, l4_hdr_offset,
542 1 + payload_nfrags, hlen, addr);
543
544 len -= hlen;
545 addr += hlen;
546 idx = (tx->req + 1) & tx->mask;
547 seg_desc = &tx->desc[idx];
548 gve_tx_fill_seg_desc(seg_desc, skb, is_gso, len, addr);
549 } else {
550 gve_tx_fill_pkt_desc(pkt_desc, skb, is_gso, l4_hdr_offset,
551 1 + payload_nfrags, hlen, addr);
552 }
553
554 for (i = 0; i < shinfo->nr_frags; i++) {
555 const skb_frag_t *frag = &shinfo->frags[i];
556
557 idx = (idx + 1) & tx->mask;
558 seg_desc = &tx->desc[idx];
559 len = skb_frag_size(frag);
560 addr = skb_frag_dma_map(tx->dev, frag, 0, len, DMA_TO_DEVICE);
561 if (unlikely(dma_mapping_error(tx->dev, addr))) {
562 tx->dma_mapping_error++;
563 goto unmap_drop;
564 }
565 buf = &tx->info[idx].buf;
566 tx->info[idx].skb = NULL;
567 dma_unmap_len_set(buf, len, len);
568 dma_unmap_addr_set(buf, dma, addr);
569
570 gve_tx_fill_seg_desc(seg_desc, skb, is_gso, len, addr);
571 }
572
573 return 1 + payload_nfrags;
574
575 unmap_drop:
576 i += (payload_nfrags == shinfo->nr_frags ? 1 : 2);
577 while (i--) {
578 idx--;
579 gve_tx_unmap_buf(tx->dev, &tx->info[idx & tx->mask]);
580 }
581 drop:
582 tx->dropped_pkt++;
583 return 0;
584 }
585
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[rcar:vsp1/v3u 17/69] drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:613:5: warning: no previous prototype for function 'rcar_mipi_dsi_clk_enable'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 15890c07a0b56cea8221557f4c28a2052c1b3d14
commit: 7708982fa60fe0d474f68d42d0354e1973df954d [17/69] drm: rcar-du: Add R-Car DSI driver
config: arm64-randconfig-r034-20210519 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project ceb1ac9812cb0972cfa34cecc5e5704ae2a22063)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout 7708982fa60fe0d474f68d42d0354e1973df954d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:613:5: warning: no previous prototype for function 'rcar_mipi_dsi_clk_enable' [-Wmissing-prototypes]
int rcar_mipi_dsi_clk_enable(struct drm_bridge *bridge)
^
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:613:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int rcar_mipi_dsi_clk_enable(struct drm_bridge *bridge)
^
static
>> drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:636:6: warning: no previous prototype for function 'rcar_mipi_dsi_clk_disable' [-Wmissing-prototypes]
void rcar_mipi_dsi_clk_disable(struct drm_bridge *bridge)
^
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:636:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void rcar_mipi_dsi_clk_disable(struct drm_bridge *bridge)
^
static
2 warnings generated.
vim +/rcar_mipi_dsi_clk_enable +613 drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
608
609 /* -----------------------------------------------------------------------------
610 * Clock Setting
611 */
612
> 613 int rcar_mipi_dsi_clk_enable(struct drm_bridge *bridge)
614 {
615 struct rcar_mipi_dsi *mipi_dsi = bridge_to_rcar_mipi_dsi(bridge);
616 int ret;
617
618 reset_control_deassert(mipi_dsi->rstc);
619
620 ret = clk_prepare_enable(mipi_dsi->clocks.mod);
621 if (ret < 0)
622 return ret;
623
624 ret = clk_prepare_enable(mipi_dsi->clocks.dsi);
625 if (ret < 0)
626 return ret;
627
628 ret = rcar_mipi_dsi_startup(mipi_dsi);
629 if (ret < 0)
630 return ret;
631
632 return 0;
633 }
634 EXPORT_SYMBOL_GPL(rcar_mipi_dsi_clk_enable);
635
> 636 void rcar_mipi_dsi_clk_disable(struct drm_bridge *bridge)
637 {
638 struct rcar_mipi_dsi *mipi_dsi = bridge_to_rcar_mipi_dsi(bridge);
639
640 rcar_mipi_dsi_shutdown(mipi_dsi);
641
642 /* Disable DSI clock and reset HW */
643 clk_disable_unprepare(mipi_dsi->clocks.dsi);
644
645 clk_disable_unprepare(mipi_dsi->clocks.mod);
646
647 reset_control_assert(mipi_dsi->rstc);
648 }
649 EXPORT_SYMBOL_GPL(rcar_mipi_dsi_clk_disable);
650
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[rcar:vsp1/v3u 48/69] drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning: variable 'info_file' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 15890c07a0b56cea8221557f4c28a2052c1b3d14
commit: 784b157f3c0a73f43f395ab88d8780eaafff6b8e [48/69] v4l: vsp1: Add debugfs system v1.8
config: arc-randconfig-r012-20210518 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout 784b157f3c0a73f43f395ab88d8780eaafff6b8e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/platform/vsp1/vsp1_debugfs.c: In function 'vsp1_debugfs_info':
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: error: 'VI6_WPF0_FRCNT' undeclared (first use in this function)
371 | seq_printf(s, "VI6_WPF0_FRCNT = 0x%08x", vsp1_read(vsp1, VI6_WPF0_FRCNT));
| ^~~~~~~~~~~~~~
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/platform/vsp1/vsp1_debugfs.c: In function 'vsp1_debugfs_init':
>> drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning: variable 'info_file' set but not used [-Wunused-but-set-variable]
471 | struct dentry *info_file;
| ^~~~~~~~~
At top level:
drivers/media/platform/vsp1/vsp1_debugfs.c:311:13: warning: 'vsp1_reg_read_and_decode' defined but not used [-Wunused-function]
311 | static void vsp1_reg_read_and_decode(struct vsp1_device *vsp1,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/vsp1/vsp1_debugfs.c:281:12: warning: 'vsp1_reg_decode' defined but not used [-Wunused-function]
281 | static int vsp1_reg_decode(struct seq_file *s, u32 offset, u32 value)
| ^~~~~~~~~~~~~~~
vim +/info_file +471 drivers/media/platform/vsp1/vsp1_debugfs.c
354
355 static int vsp1_debugfs_info(struct seq_file *s, void *p)
356 {
357 struct vsp1_device *vsp1 = s->private;
358 unsigned int i;
359 u32 status;
360
361 /* Make sure all reads are with 'powered' device */
362 vsp1_device_get(vsp1);
363
364 seq_printf(s, "name: %s\n", vsp1->info->model ? vsp1->info->model : "");
365
366 status = vsp1_read(vsp1, VI6_STATUS);
367 seq_printf(s, "VI6_STATUS = 0x%08x : ", status);
368 decode_vi6_status(s, status);
369 seq_puts(s, "\n");
370
> 371 seq_printf(s, "VI6_WPF0_FRCNT = 0x%08x", vsp1_read(vsp1, VI6_WPF0_FRCNT));
372
373 for (i = 0; i < vsp1->info->wpf_count; ++i) {
374 struct vsp1_rwpf *wpf = vsp1->wpf[i];
375 u32 status;
376 u32 enable;
377
378 if (wpf == NULL)
379 continue;
380
381 enable = vsp1_read(vsp1, VI6_WPF_IRQ_ENB(i));
382 status = vsp1_read(vsp1, VI6_WPF_IRQ_STA(i));
383
384 seq_printf(s, "VI6_WPF_IRQ_ENB(%d) = ", i);
385 decode_vi6_wpf_enb(s, enable);
386 seq_puts(s, "\n");
387
388 seq_printf(s, "VI6_WPF_IRQ_STA(%d) = ", i);
389 decode_vi6_wpf_sta(s, status);
390 seq_puts(s, "\n");
391
392 seq_printf(s, "WPF[%d]->entity->Pipe = %p\n", i, wpf->entity.pipe);
393 /* Report the WPF Pipe information */
394 vsp1_debugfs_print_vsp1_pipe(s, wpf->entity.pipe, "WPF");
395
396 status = vsp1_read(vsp1, VI6_DISP_IRQ_STA(i));
397 seq_printf(s, "VI6_DISP_IRQ_STA(%d) = ", i);
398 decode_vi6_disp_irq_sta(s, status);
399 seq_puts(s, "\n");
400 }
401
402 for (i = 0; i < vsp1->info->rpf_count; ++i) {
403 struct vsp1_rwpf *rpf = vsp1->rpf[i];
404
405 if (rpf == NULL)
406 continue;
407
408 seq_printf(s,
409 "RPF[%d]->entity.pipe = %p\n", i, rpf->entity.pipe);
410
411 vsp1_debugfs_print_vsp1_pipe(s, rpf->entity.pipe, "RPF");
412
413 }
414
415 vsp1_device_put(vsp1);
416
417 return 0;
418 }
419 DEBUGFS_RO_ATTR(vsp1_debugfs_info);
420
421 static int vsp1_debugfs_regs(struct seq_file *s, void *p)
422 {
423 struct vsp1_device *vsp1 = s->private;
424 unsigned int i;
425 u32 status;
426
427 /* Make sure all reads are with 'powered' device */
428 vsp1_device_get(vsp1);
429
430 for (i = 0; i < ARRAY_SIZE(vsp1_regset); i++) {
431 const struct debugfs_reg32 *reg = &vsp1_regset[i];
432
433 status = vsp1_read(vsp1, reg->offset);
434
435 seq_printf(s, "0x%08x [%s]\n", status, reg->name);
436 }
437
438 vsp1_device_put(vsp1);
439
440 return 0;
441 }
442 DEBUGFS_RO_ATTR(vsp1_debugfs_regs);
443
444 static int vsp1_debugfs_reset_wpf(struct seq_file *s, void *p)
445 {
446 struct vsp1_device *vsp1 = s->private;
447 int ret;
448
449 /* Make sure all reads are with 'powered' device */
450 vsp1_device_get(vsp1);
451
452 /* Prints are 'before' and 'after' to preserve timing on output */
453 seq_puts(s, "Resetting WPF[0] : ");
454
455 ret = vsp1_reset_wpf(vsp1->wpf[0]->entity.vsp1,
456 vsp1->wpf[0]->entity.index);
457 if (ret == 0)
458 seq_puts(s, "Success\n");
459 else
460 seq_puts(s, "Failed\n");
461
462 vsp1_device_put(vsp1);
463
464 return 0;
465 }
466 DEBUGFS_RO_ATTR(vsp1_debugfs_reset_wpf);
467
468 /* Debugfs initialised after entities are created */
469 int vsp1_debugfs_init(struct vsp1_device *vsp1)
470 {
> 471 struct dentry *info_file;
472
473 vsp1->regset.regs = vsp1_regset;
474 vsp1->regset.base = vsp1->mmio;
475 vsp1->regset.nregs = ARRAY_SIZE(vsp1_regset);
476
477 vsp1->dbgroot = debugfs_create_dir(dev_name(vsp1->dev), NULL);
478 if (!vsp1->dbgroot)
479 return -ENOMEM;
480
481 /* dentry pointer discarded */
482 info_file = debugfs_create_file("info", 0444,
483 vsp1->dbgroot,
484 vsp1,
485 &vsp1_debugfs_info_fops);
486
487 /* dentry pointer discarded */
488 info_file = debugfs_create_file("regs_local", 0444,
489 vsp1->dbgroot,
490 vsp1,
491 &vsp1_debugfs_regs_fops);
492
493 /* dentry pointer discarded */
494 info_file = debugfs_create_file("reset_wpf0", 0444,
495 vsp1->dbgroot,
496 vsp1,
497 &vsp1_debugfs_reset_wpf_fops);
498
499 debugfs_create_regset32("regs", 0444, vsp1->dbgroot, &vsp1->regset);
500
501 return 0;
502 }
503
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[luto:x86/kentry 2/11] kernel/sched/core.c:5476:89: error: macro "static_call_update" passed 3 arguments, but takes just 2
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git x86/kentry
head: fb951a475a1cd1e5e280ee8b4ce64a6a68c77b64
commit: dcdc171ab7d985c6e6eea0c4ccefb5785250ff8e [2/11] kentry: Rename irqentry to kentry
config: i386-randconfig-a003-20210519 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?id...
git remote add luto https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git
git fetch --no-tags luto x86/kentry
git checkout dcdc171ab7d985c6e6eea0c4ccefb5785250ff8e
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/sched/core.c:2850:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
2850 | void sched_set_stop_task(int cpu, struct task_struct *stop)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/core.c: In function 'sched_dynamic_update':
>> kernel/sched/core.c:5476:89: error: macro "static_call_update" passed 3 arguments, but takes just 2
5476 | static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
| ^
In file included from include/linux/tracepoint.h:22,
from include/trace/events/sched.h:10,
from kernel/sched/core.c:10:
include/linux/static_call.h:119: note: macro "static_call_update" defined here
119 | #define static_call_update(name, func) \
|
>> kernel/sched/core.c:5476:3: error: 'static_call_update' undeclared (first use in this function); did you mean 'static_call_site'?
5476 | static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
| ^~~~~~~~~~~~~~~~~~
| static_call_site
kernel/sched/core.c:5476:3: note: each undeclared identifier is reported only once for each function it appears in
kernel/sched/core.c:5485:89: error: macro "static_call_update" passed 3 arguments, but takes just 2
5485 | static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
| ^
In file included from include/linux/tracepoint.h:22,
from include/trace/events/sched.h:10,
from kernel/sched/core.c:10:
include/linux/static_call.h:119: note: macro "static_call_update" defined here
119 | #define static_call_update(name, func) \
|
vim +/static_call_update +5476 kernel/sched/core.c
5457
5458 void sched_dynamic_update(int mode)
5459 {
5460 /*
5461 * Avoid {NONE,VOLUNTARY} -> FULL transitions from ever ending up in
5462 * the ZERO state, which is invalid.
5463 */
5464 static_call_update(cond_resched, __cond_resched);
5465 static_call_update(might_resched, __cond_resched);
5466 static_call_update(preempt_schedule, __preempt_schedule_func);
5467 static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func);
5468 static_call_update(kentry_exit_cond_resched, kentry_exit_cond_resched);
5469
5470 switch (mode) {
5471 case preempt_dynamic_none:
5472 static_call_update(cond_resched, __cond_resched);
5473 static_call_update(might_resched, (void *)&__static_call_return0);
5474 static_call_update(preempt_schedule, NULL);
5475 static_call_update(preempt_schedule_notrace, NULL);
> 5476 static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
5477 pr_info("Dynamic Preempt: none\n");
5478 break;
5479
5480 case preempt_dynamic_voluntary:
5481 static_call_update(cond_resched, __cond_resched);
5482 static_call_update(might_resched, __cond_resched);
5483 static_call_update(preempt_schedule, NULL);
5484 static_call_update(preempt_schedule_notrace, NULL);
5485 static_call_update(kentry_exit_cond_resched, (typeof(&kentry_exit_cond_resched)), NULL);
5486 pr_info("Dynamic Preempt: voluntary\n");
5487 break;
5488
5489 case preempt_dynamic_full:
5490 static_call_update(cond_resched, (void *)&__static_call_return0);
5491 static_call_update(might_resched, (void *)&__static_call_return0);
5492 static_call_update(preempt_schedule, __preempt_schedule_func);
5493 static_call_update(preempt_schedule_notrace, __preempt_schedule_notrace_func);
5494 static_call_update(kentry_exit_cond_resched, kentry_exit_cond_resched);
5495 pr_info("Dynamic Preempt: full\n");
5496 break;
5497 }
5498
5499 preempt_dynamic_mode = mode;
5500 }
5501
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
include/linux/avf/virtchnl.h:833:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_proto_hdrs' is not an integer constant
by kernel test robot
Hi Qi,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f
commit: 1f7ea1cd6a3748427512ccc9582e18cd9efea966 ice: Enable FDIR Configure for AVF
date: 8 weeks ago
config: m68k-randconfig-r025-20210519 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1f7ea1cd6a3748427512ccc9582e18cd9efea966
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9,
from drivers/net/ethernet/intel/i40e/i40e.h:41,
from drivers/net/ethernet/intel/i40e/i40e_main.c:11:
>> include/linux/avf/virtchnl.h:150:36: warning: division by zero [-Wdiv-by-zero]
150 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:833:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
833 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:833:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_proto_hdrs' is not an integer constant
833 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
| ^~~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:150:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
150 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
>> include/linux/avf/virtchnl.h:150:36: warning: division by zero [-Wdiv-by-zero]
150 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:874:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
874 | VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:874:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_fdir_rule' is not an integer constant
874 | VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
| ^~~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:150:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
150 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
>> include/linux/avf/virtchnl.h:150:36: warning: division by zero [-Wdiv-by-zero]
150 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
include/linux/avf/virtchnl.h:928:1: note: in expansion of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
928 | VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/avf/virtchnl.h:928:33: error: enumerator value for 'virtchnl_static_assert_virtchnl_fdir_add' is not an integer constant
928 | VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
| ^~~~~~~~~~~~~~~~~
include/linux/avf/virtchnl.h:150:53: note: in definition of macro 'VIRTCHNL_CHECK_STRUCT_LEN'
150 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) }
| ^
vim +/virtchnl_static_assert_virtchnl_proto_hdrs +833 include/linux/avf/virtchnl.h
832
> 833 VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs);
834
835 /* action configuration for FDIR */
836 struct virtchnl_filter_action {
837 enum virtchnl_action type;
838 union {
839 /* used for queue and qgroup action */
840 struct {
841 u16 index;
842 u8 region;
843 } queue;
844 /* used for count action */
845 struct {
846 /* share counter ID with other flow rules */
847 u8 shared;
848 u32 id; /* counter ID */
849 } count;
850 /* used for mark action */
851 u32 mark_id;
852 u8 reserve[32];
853 } act_conf;
854 };
855
856 VIRTCHNL_CHECK_STRUCT_LEN(36, virtchnl_filter_action);
857
858 #define VIRTCHNL_MAX_NUM_ACTIONS 8
859
860 struct virtchnl_filter_action_set {
861 /* action number must be less then VIRTCHNL_MAX_NUM_ACTIONS */
862 int count;
863 struct virtchnl_filter_action actions[VIRTCHNL_MAX_NUM_ACTIONS];
864 };
865
866 VIRTCHNL_CHECK_STRUCT_LEN(292, virtchnl_filter_action_set);
867
868 /* pattern and action for FDIR rule */
869 struct virtchnl_fdir_rule {
870 struct virtchnl_proto_hdrs proto_hdrs;
871 struct virtchnl_filter_action_set action_set;
872 };
873
> 874 VIRTCHNL_CHECK_STRUCT_LEN(2604, virtchnl_fdir_rule);
875
876 /* Status returned to VF after VF requests FDIR commands
877 * VIRTCHNL_FDIR_SUCCESS
878 * VF FDIR related request is successfully done by PF
879 * The request can be OP_ADD/DEL.
880 *
881 * VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE
882 * OP_ADD_FDIR_FILTER request is failed due to no Hardware resource.
883 *
884 * VIRTCHNL_FDIR_FAILURE_RULE_EXIST
885 * OP_ADD_FDIR_FILTER request is failed due to the rule is already existed.
886 *
887 * VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT
888 * OP_ADD_FDIR_FILTER request is failed due to conflict with existing rule.
889 *
890 * VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST
891 * OP_DEL_FDIR_FILTER request is failed due to this rule doesn't exist.
892 *
893 * VIRTCHNL_FDIR_FAILURE_RULE_INVALID
894 * OP_ADD_FDIR_FILTER request is failed due to parameters validation
895 * or HW doesn't support.
896 *
897 * VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT
898 * OP_ADD/DEL_FDIR_FILTER request is failed due to timing out
899 * for programming.
900 */
901 enum virtchnl_fdir_prgm_status {
902 VIRTCHNL_FDIR_SUCCESS = 0,
903 VIRTCHNL_FDIR_FAILURE_RULE_NORESOURCE,
904 VIRTCHNL_FDIR_FAILURE_RULE_EXIST,
905 VIRTCHNL_FDIR_FAILURE_RULE_CONFLICT,
906 VIRTCHNL_FDIR_FAILURE_RULE_NONEXIST,
907 VIRTCHNL_FDIR_FAILURE_RULE_INVALID,
908 VIRTCHNL_FDIR_FAILURE_RULE_TIMEOUT,
909 };
910
911 /* VIRTCHNL_OP_ADD_FDIR_FILTER
912 * VF sends this request to PF by filling out vsi_id,
913 * validate_only and rule_cfg. PF will return flow_id
914 * if the request is successfully done and return add_status to VF.
915 */
916 struct virtchnl_fdir_add {
917 u16 vsi_id; /* INPUT */
918 /*
919 * 1 for validating a fdir rule, 0 for creating a fdir rule.
920 * Validate and create share one ops: VIRTCHNL_OP_ADD_FDIR_FILTER.
921 */
922 u16 validate_only; /* INPUT */
923 u32 flow_id; /* OUTPUT */
924 struct virtchnl_fdir_rule rule_cfg; /* INPUT */
925 enum virtchnl_fdir_prgm_status status; /* OUTPUT */
926 };
927
> 928 VIRTCHNL_CHECK_STRUCT_LEN(2616, virtchnl_fdir_add);
929
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months
[linux-next:master 2950/3150] mm/mremap.c:285:8: warning: variable 'pud' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cd557f1c605fc5a2c0eb0b540610f50dc67dd849
commit: dbee97d1f49a2f2f1f5c26bf15151cc998572e89 [2950/3150] mm/mremap: use pmd/pud_poplulate to update page table entries
config: i386-randconfig-r006-20210517 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout dbee97d1f49a2f2f1f5c26bf15151cc998572e89
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
mm/mremap.c: In function 'move_normal_pud':
>> mm/mremap.c:285:8: warning: variable 'pud' set but not used [-Wunused-but-set-variable]
285 | pud_t pud;
| ^~~
vim +/pud +285 mm/mremap.c
2c91bd4a4e2e53 Joel Fernandes (Google 2019-01-03 278)
c49dd340180260 Kalesh Singh 2020-12-14 279 #ifdef CONFIG_HAVE_MOVE_PUD
c49dd340180260 Kalesh Singh 2020-12-14 280 static bool move_normal_pud(struct vm_area_struct *vma, unsigned long old_addr,
c49dd340180260 Kalesh Singh 2020-12-14 281 unsigned long new_addr, pud_t *old_pud, pud_t *new_pud)
c49dd340180260 Kalesh Singh 2020-12-14 282 {
c49dd340180260 Kalesh Singh 2020-12-14 283 spinlock_t *old_ptl, *new_ptl;
c49dd340180260 Kalesh Singh 2020-12-14 284 struct mm_struct *mm = vma->vm_mm;
c49dd340180260 Kalesh Singh 2020-12-14 @285 pud_t pud;
c49dd340180260 Kalesh Singh 2020-12-14 286
c49dd340180260 Kalesh Singh 2020-12-14 287 /*
c49dd340180260 Kalesh Singh 2020-12-14 288 * The destination pud shouldn't be established, free_pgtables()
c49dd340180260 Kalesh Singh 2020-12-14 289 * should have released it.
c49dd340180260 Kalesh Singh 2020-12-14 290 */
c49dd340180260 Kalesh Singh 2020-12-14 291 if (WARN_ON_ONCE(!pud_none(*new_pud)))
c49dd340180260 Kalesh Singh 2020-12-14 292 return false;
c49dd340180260 Kalesh Singh 2020-12-14 293
c49dd340180260 Kalesh Singh 2020-12-14 294 /*
c49dd340180260 Kalesh Singh 2020-12-14 295 * We don't have to worry about the ordering of src and dst
c49dd340180260 Kalesh Singh 2020-12-14 296 * ptlocks because exclusive mmap_lock prevents deadlock.
c49dd340180260 Kalesh Singh 2020-12-14 297 */
c49dd340180260 Kalesh Singh 2020-12-14 298 old_ptl = pud_lock(vma->vm_mm, old_pud);
c49dd340180260 Kalesh Singh 2020-12-14 299 new_ptl = pud_lockptr(mm, new_pud);
c49dd340180260 Kalesh Singh 2020-12-14 300 if (new_ptl != old_ptl)
c49dd340180260 Kalesh Singh 2020-12-14 301 spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
c49dd340180260 Kalesh Singh 2020-12-14 302
c49dd340180260 Kalesh Singh 2020-12-14 303 /* Clear the pud */
c49dd340180260 Kalesh Singh 2020-12-14 304 pud = *old_pud;
c49dd340180260 Kalesh Singh 2020-12-14 305 pud_clear(old_pud);
c49dd340180260 Kalesh Singh 2020-12-14 306
c49dd340180260 Kalesh Singh 2020-12-14 307 VM_BUG_ON(!pud_none(*new_pud));
c49dd340180260 Kalesh Singh 2020-12-14 308
dbee97d1f49a2f Aneesh Kumar K.V 2021-05-14 309 pud_populate(mm, new_pud, (pmd_t *)pud_page_vaddr(pud));
c49dd340180260 Kalesh Singh 2020-12-14 310 flush_tlb_range(vma, old_addr, old_addr + PUD_SIZE);
c49dd340180260 Kalesh Singh 2020-12-14 311 if (new_ptl != old_ptl)
c49dd340180260 Kalesh Singh 2020-12-14 312 spin_unlock(new_ptl);
c49dd340180260 Kalesh Singh 2020-12-14 313 spin_unlock(old_ptl);
c49dd340180260 Kalesh Singh 2020-12-14 314
c49dd340180260 Kalesh Singh 2020-12-14 315 return true;
c49dd340180260 Kalesh Singh 2020-12-14 316 }
c49dd340180260 Kalesh Singh 2020-12-14 317 #else
c49dd340180260 Kalesh Singh 2020-12-14 318 static inline bool move_normal_pud(struct vm_area_struct *vma,
c49dd340180260 Kalesh Singh 2020-12-14 319 unsigned long old_addr, unsigned long new_addr, pud_t *old_pud,
c49dd340180260 Kalesh Singh 2020-12-14 320 pud_t *new_pud)
c49dd340180260 Kalesh Singh 2020-12-14 321 {
c49dd340180260 Kalesh Singh 2020-12-14 322 return false;
c49dd340180260 Kalesh Singh 2020-12-14 323 }
c49dd340180260 Kalesh Singh 2020-12-14 324 #endif
c49dd340180260 Kalesh Singh 2020-12-14 325
:::::: The code at line 285 was first introduced by commit
:::::: c49dd340180260c6239e453263a9a244da9a7c85 mm: speedup mremap on 1GB or larger regions
:::::: TO: Kalesh Singh <kaleshsingh(a)google.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 4 months