[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209212152.CK3TaFvf-lkp@intel.com>
Date: Wed, 21 Sep 2022 21:53:57 +0800
From: kernel test robot <lkp@...el.com>
To: Chengming Zhou <zhouchengming@...edance.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
x86@...nel.org, Peter Zijlstra <peterz@...radead.org>
Subject: [tip:sched/psi 8/11] kernel/sched/core.c:711:31: sparse: sparse:
incorrect type in argument 1 (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/psi
head: 34f26a15611afb03c33df6819359d36f5b382589
commit: 52b1364ba0b105122d6de0e719b36db705011ac1 [8/11] sched/psi: Add PSI_IRQ to track IRQ/SOFTIRQ pressure
config: loongarch-randconfig-s032-20220921
compiler: loongarch64-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=52b1364ba0b105122d6de0e719b36db705011ac1
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/psi
git checkout 52b1364ba0b105122d6de0e719b36db705011ac1
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=loongarch SHELL=/bin/bash kernel/sched/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/sched/core.c:711:31: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *task @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:711:31: sparse: expected struct task_struct *task
kernel/sched/core.c:711:31: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:781:48: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:781:48: sparse: expected struct task_struct *p
kernel/sched/core.c:781:48: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:1028:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:1028:38: sparse: expected struct task_struct *curr
kernel/sched/core.c:1028:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:2192:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:2192:33: sparse: expected struct task_struct *p
kernel/sched/core.c:2192:33: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:2192:68: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *tsk @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:2192:68: sparse: expected struct task_struct *tsk
kernel/sched/core.c:2192:68: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:3592:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/core.c:3592:17: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/core.c:3592:17: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/core.c:3789:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct const *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:3789:28: sparse: expected struct task_struct const *p
kernel/sched/core.c:3789:28: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:9156:43: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *push_task @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:9156:43: sparse: expected struct task_struct *push_task
kernel/sched/core.c:9156:43: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:5441:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:5441:38: sparse: expected struct task_struct *curr
kernel/sched/core.c:5441:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:6387:14: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct task_struct *prev @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:6387:14: sparse: expected struct task_struct *prev
kernel/sched/core.c:6387:14: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:6913:17: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:6913:17: sparse: struct task_struct *
kernel/sched/core.c:6913:17: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7129:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:7129:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:7129:22: sparse: struct task_struct *
kernel/sched/core.c:11188:25: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/core.c:11188:25: sparse: expected struct task_struct *p
kernel/sched/core.c:11188:25: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:544:17: sparse: sparse: context imbalance in 'raw_spin_rq_lock_nested' - wrong count at exit
kernel/sched/core.c:570:23: sparse: sparse: context imbalance in 'raw_spin_rq_trylock' - wrong count at exit
kernel/sched/core.c:586:6: sparse: sparse: context imbalance in 'raw_spin_rq_unlock' - unexpected unlock
kernel/sched/core.c:624:36: sparse: sparse: context imbalance in '__task_rq_lock' - wrong count at exit
kernel/sched/core.c:665:36: sparse: sparse: context imbalance in 'task_rq_lock' - wrong count at exit
kernel/sched/core.c: note: in included file:
kernel/sched/pelt.h:97:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct const *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/pelt.h:97:13: sparse: expected struct task_struct const *p
kernel/sched/pelt.h:97:13: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/core.c:781:11: sparse: sparse: dereference of noderef expression
kernel/sched/core.c:2183:33: sparse: sparse: dereference of noderef expression
kernel/sched/core.c:2184:19: sparse: sparse: dereference of noderef expression
kernel/sched/core.c:2185:18: sparse: sparse: dereference of noderef expression
kernel/sched/core.c: note: in included file:
kernel/sched/sched.h:2060:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2060:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2060:25: sparse: struct task_struct *
kernel/sched/sched.h:2217:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2217:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2217:9: sparse: struct task_struct *
kernel/sched/core.c:2158:38: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/core.c:2158:38: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core.c:2158:38: sparse: struct task_struct const *
kernel/sched/sched.h:2060:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2060:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2060:25: sparse: struct task_struct *
kernel/sched/sched.h:2217:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2217:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2217:9: sparse: struct task_struct *
kernel/sched/sched.h:2217:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2217:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2217:9: sparse: struct task_struct *
kernel/sched/core.c: note: in included file (through arch/loongarch/include/asm/cpu-info.h, arch/loongarch/include/asm/processor.h, ...):
arch/loongarch/include/asm/loongarch.h:242:9: sparse: sparse: undefined identifier '__builtin_loongarch_csrwr_w'
arch/loongarch/include/asm/loongarch.h:242:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: undefined identifier '__builtin_loongarch_csrwr_d'
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:247:9: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:232:16: sparse: sparse: undefined identifier '__builtin_loongarch_csrrd_w'
arch/loongarch/include/asm/loongarch.h:232:16: sparse: sparse: cast from unknown type
arch/loongarch/include/asm/loongarch.h:242:9: sparse: sparse: cast from unknown type
kernel/sched/core.c: note: in included file:
kernel/sched/sched.h:2060:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2060:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2060:25: sparse: struct task_struct *
kernel/sched/sched.h:2217:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2217:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2217:9: sparse: struct task_struct *
kernel/sched/sched.h:2060:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2060:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2060:25: sparse: struct task_struct *
kernel/sched/sched.h:2217:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2217:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2217:9: sparse: struct task_struct *
kernel/sched/sched.h:2060:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2060:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2060:25: sparse: struct task_struct *
kernel/sched/sched.h:2217:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2217:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2217:9: sparse: struct task_struct *
kernel/sched/core.c: note: in included file (through arch/loongarch/include/asm/cpu-info.h, arch/loongarch/include/asm/processor.h, ...):
arch/loongarch/include/asm/loongarch.h:242:9: sparse: sparse: cast from unknown type
vim +711 kernel/sched/core.c
675
676 /*
677 * RQ-clock updating methods:
678 */
679
680 static void update_rq_clock_task(struct rq *rq, s64 delta)
681 {
682 /*
683 * In theory, the compile should just see 0 here, and optimize out the call
684 * to sched_rt_avg_update. But I don't trust it...
685 */
686 s64 __maybe_unused steal = 0, irq_delta = 0;
687
688 #ifdef CONFIG_IRQ_TIME_ACCOUNTING
689 irq_delta = irq_time_read(cpu_of(rq)) - rq->prev_irq_time;
690
691 /*
692 * Since irq_time is only updated on {soft,}irq_exit, we might run into
693 * this case when a previous update_rq_clock() happened inside a
694 * {soft,}irq region.
695 *
696 * When this happens, we stop ->clock_task and only update the
697 * prev_irq_time stamp to account for the part that fit, so that a next
698 * update will consume the rest. This ensures ->clock_task is
699 * monotonic.
700 *
701 * It does however cause some slight miss-attribution of {soft,}irq
702 * time, a more accurate solution would be to update the irq_time using
703 * the current rq->clock timestamp, except that would require using
704 * atomic ops.
705 */
706 if (irq_delta > delta)
707 irq_delta = delta;
708
709 rq->prev_irq_time += irq_delta;
710 delta -= irq_delta;
> 711 psi_account_irqtime(rq->curr, irq_delta);
712 #endif
713 #ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING
714 if (static_key_false((¶virt_steal_rq_enabled))) {
715 steal = paravirt_steal_clock(cpu_of(rq));
716 steal -= rq->prev_steal_time_rq;
717
718 if (unlikely(steal > delta))
719 steal = delta;
720
721 rq->prev_steal_time_rq += steal;
722 delta -= steal;
723 }
724 #endif
725
726 rq->clock_task += delta;
727
--
0-DAY CI Kernel Test Service
https://01.org/lkp
View attachment "config" of type "text/plain" (186261 bytes)
Powered by blists - more mailing lists