[mel:sched-notarget-v1r15 7/8] kernel/sched/fair.c:7053:12: sparse: sparse: incorrect type in assignment (different address spaces)
From: kernel test robot
Date: Thu Jul 15 2021 - 15:18:25 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git sched-notarget-v1r15
head: a9ca7602387d3ed6aa80ccd5cc7e491709dbebae
commit: 20791824e212ce10d7abfa7a6bcdad80f05ab376 [7/8] sched/fair: select idle cpu from idle cpumask for task wakeup
config: ia64-randconfig-s031-20210715 (attached as .config)
compiler: ia64-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-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git/commit/?id=20791824e212ce10d7abfa7a6bcdad80f05ab376
git remote add mel https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git
git fetch --no-tags mel sched-notarget-v1r15
git checkout 20791824e212ce10d7abfa7a6bcdad80f05ab376
# 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__' ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
sparse warnings: (new ones prefixed by >>)
kernel/sched/fair.c:830:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_entity *se @@ got struct sched_entity [noderef] __rcu * @@
kernel/sched/fair.c:830:34: sparse: expected struct sched_entity *se
kernel/sched/fair.c:830:34: sparse: got struct sched_entity [noderef] __rcu *
kernel/sched/fair.c:10816:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:10816:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:10816:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:4961:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:4961:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:4961:22: sparse: struct task_struct *
kernel/sched/fair.c:6783:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:6783:20: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:6783:20: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:6917:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:6917:9: sparse: expected struct sched_domain *[assigned] tmp
kernel/sched/fair.c:6917:9: sparse: got struct sched_domain [noderef] __rcu *parent
>> kernel/sched/fair.c:7053:12: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *sd @@ got struct sched_domain [noderef] __rcu * @@
kernel/sched/fair.c:7053:12: sparse: expected struct sched_domain *sd
kernel/sched/fair.c:7053:12: sparse: got struct sched_domain [noderef] __rcu *
kernel/sched/fair.c:7150:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:7150:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:7150:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:7434:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:7434:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:7434:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:8419:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@
kernel/sched/fair.c:8419:40: sparse: expected struct sched_domain *child
kernel/sched/fair.c:8419:40: sparse: got struct sched_domain [noderef] __rcu *child
kernel/sched/fair.c:8867:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:8867:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:8867:22: sparse: struct task_struct *
kernel/sched/fair.c:10130:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:10130:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:10130:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:9790:44: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *sd_parent @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:9790:44: sparse: expected struct sched_domain *sd_parent
kernel/sched/fair.c:9790:44: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:10202:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:10202:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:10202:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:4626:31: sparse: sparse: marked inline, but without a definition
kernel/sched/fair.c: note: in included file:
kernel/sched/sched.h:2185:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2185:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2185:9: sparse: struct task_struct *
kernel/sched/sched.h:2027:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2027:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2027:25: sparse: struct task_struct *
kernel/sched/sched.h:2027:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2027:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2027:25: sparse: struct task_struct *
vim +7053 kernel/sched/fair.c
7026
7027 /*
7028 * Update cpu idle state and record this information
7029 * in sd_llc_shared->idle_cpus_span.
7030 *
7031 * This function is called with interrupts disabled.
7032 */
7033 void update_idle_cpumask(int cpu, bool idle)
7034 {
7035 struct sched_domain *sd;
7036 struct rq *rq = cpu_rq(cpu);
7037 int idle_state;
7038
7039 /*
7040 * Also set SCHED_IDLE cpu in idle cpumask to
7041 * allow SCHED_IDLE cpu as a wakeup target.
7042 */
7043 idle_state = idle || sched_idle_cpu(cpu);
7044 /*
7045 * No need to update idle cpumask if the state
7046 * does not change.
7047 */
7048 if (rq->last_idle_state == idle_state)
7049 return;
7050 /*
7051 * Called with irq disabled, rcu protection is not needed.
7052 */
> 7053 sd = per_cpu(sd_llc, cpu);
7054 if (unlikely(!sd))
7055 return;
7056
7057 if (idle_state)
7058 cpumask_set_cpu(cpu, sds_idle_cpus(sd->shared));
7059 else
7060 cpumask_clear_cpu(cpu, sds_idle_cpus(sd->shared));
7061
7062 rq->last_idle_state = idle_state;
7063 }
7064 #endif /* CONFIG_SMP */
7065
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip