CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Boqun Feng <boqun.f...@gmail.com>
CC: Peter Zijlstra <pet...@infradead.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   f8e6dfc64f6135d1b6c5215c14cd30b9b60a0008
commit: 9271a40d2a1429113160ccc4c16150921600bcc1 lockdep/selftest: Add wait 
context selftests
date:   7 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 7 months ago
config: riscv-randconfig-s032-20210813 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 10.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-348-gf0e6938b-dirty
        # 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9271a40d2a1429113160ccc4c16150921600bcc1
        git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 9271a40d2a1429113160ccc4c16150921600bcc1
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=riscv 
SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <l...@intel.com>


sparse warnings: (new ones prefixed by >>)
   lib/locking-selftest.c:298:1: sparse: sparse: context imbalance in 'AA_spin' 
- wrong count at exit
   lib/locking-selftest.c:300:1: sparse: sparse: context imbalance in 
'AA_wlock' - wrong count at exit
   lib/locking-selftest.c:302:1: sparse: sparse: context imbalance in 
'AA_rlock' - wrong count at exit
   lib/locking-selftest.c:321:13: sparse: sparse: context imbalance in 
'rlock_AA1' - wrong count at exit
   lib/locking-selftest.c:327:13: sparse: sparse: context imbalance in 
'rlock_AA1B' - wrong count at exit
   lib/locking-selftest.c:347:13: sparse: sparse: context imbalance in 
'rlock_AA2' - wrong count at exit
   lib/locking-selftest.c:359:13: sparse: sparse: context imbalance in 
'rlock_AA3' - wrong count at exit
   lib/locking-selftest.c:722:1: sparse: sparse: context imbalance in 
'double_unlock_spin' - unexpected unlock
   lib/locking-selftest.c:724:1: sparse: sparse: context imbalance in 
'double_unlock_wlock' - unexpected unlock
   lib/locking-selftest.c:726:1: sparse: sparse: context imbalance in 
'double_unlock_rlock' - unexpected unlock
   lib/locking-selftest.c:753:1: sparse: sparse: context imbalance in 
'init_held_spin' - wrong count at exit
   lib/locking-selftest.c:755:1: sparse: sparse: context imbalance in 
'init_held_wlock' - wrong count at exit
   lib/locking-selftest.c:757:1: sparse: sparse: context imbalance in 
'init_held_rlock' - wrong count at exit
   lib/locking-selftest.c:2456:13: sparse: sparse: context imbalance in 
'rcu_exit' - unexpected unlock
   lib/locking-selftest.c:2465:13: sparse: sparse: context imbalance in 
'rcu_bh_exit' - unexpected unlock
   lib/locking-selftest.c:2474:13: sparse: sparse: context imbalance in 
'rcu_sched_exit' - unexpected unlock
   lib/locking-selftest.c:2493:13: sparse: sparse: context imbalance in 
'raw_spinlock_exit' - unexpected unlock
   lib/locking-selftest.c:2502:13: sparse: sparse: context imbalance in 
'spinlock_exit' - unexpected unlock
   lib/locking-selftest.c: note: in included file (through 
include/linux/thread_info.h, include/asm-generic/preempt.h, 
arch/riscv/include/generated/asm/preempt.h, ...):
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'RCU_in_HARDIRQ' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'RCU_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'RCU_in_SOFTIRQ' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU_BH' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU_CALLBACK' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RCU_SCHED' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_RAW_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2573:1: sparse: sparse: context imbalance in 
'RCU_in_MUTEX' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'RAW_SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'RAW_SPINLOCK_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'RAW_SPINLOCK_in_SOFTIRQ' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_RCU' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_RCU_BH' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_RCU_CALLBACK' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_RCU_SCHED' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_RAW_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2574:1: sparse: sparse: context imbalance in 
'RAW_SPINLOCK_in_MUTEX' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'SPINLOCK_in_HARDIRQ' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'SPINLOCK_in_NOTTHREADED_HARDIRQ' - wrong count at exit
>> arch/riscv/include/asm/current.h:31:9: sparse: sparse: context imbalance in 
>> 'SPINLOCK_in_SOFTIRQ' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_RCU' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_RCU_BH' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_RCU_CALLBACK' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_RCU_SCHED' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_RAW_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2575:1: sparse: sparse: context imbalance in 
'SPINLOCK_in_MUTEX' - wrong count at exit
   lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 
'MUTEX_in_RCU' - wrong count at exit
   lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 
'MUTEX_in_RCU_BH' - wrong count at exit
   lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 
'MUTEX_in_RCU_SCHED' - wrong count at exit
   lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 
'MUTEX_in_RAW_SPINLOCK' - wrong count at exit
   lib/locking-selftest.c:2576:1: sparse: sparse: context imbalance in 
'MUTEX_in_SPINLOCK' - wrong count at exit

vim +/RCU_in_HARDIRQ +31 arch/riscv/include/asm/current.h

52e7c52d2ded59 Palmer Dabbelt 2020-02-27  21  
7db91e57a0acde Palmer Dabbelt 2017-07-10  22  /*
7db91e57a0acde Palmer Dabbelt 2017-07-10  23   * This only works because 
"struct thread_info" is at offset 0 from "struct
7db91e57a0acde Palmer Dabbelt 2017-07-10  24   * task_struct".  This constraint 
seems to be necessary on other architectures
7db91e57a0acde Palmer Dabbelt 2017-07-10  25   * as well, but __switch_to 
enforces it.  We can't check TASK_TI here because
7db91e57a0acde Palmer Dabbelt 2017-07-10  26   * <asm/asm-offsets.h> includes 
this, and I can't get the definition of "struct
7db91e57a0acde Palmer Dabbelt 2017-07-10  27   * task_struct" here due to some 
header ordering problems.
7db91e57a0acde Palmer Dabbelt 2017-07-10  28   */
7db91e57a0acde Palmer Dabbelt 2017-07-10  29  static __always_inline struct 
task_struct *get_current(void)
7db91e57a0acde Palmer Dabbelt 2017-07-10  30  {
52e7c52d2ded59 Palmer Dabbelt 2020-02-27 @31    return riscv_current_is_tp;
7db91e57a0acde Palmer Dabbelt 2017-07-10  32  }
7db91e57a0acde Palmer Dabbelt 2017-07-10  33  

:::::: The code at line 31 was first introduced by commit
:::::: 52e7c52d2ded5908e6a4f8a7248e5fa6e0d6809a RISC-V: Stop relying on GCC's 
register allocator's hueristics

:::::: TO: Palmer Dabbelt <palmerdabb...@google.com>
:::::: CC: Palmer Dabbelt <palmerdabb...@google.com>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org

Reply via email to