[mel:sched-noprop-v2r3 3/4] kernel/sched/fair.c:7088:12: sparse: sparse: incorrect type in assignment (different address spaces)

From: kernel test robot
Date: Thu Sep 16 2021 - 19:15:04 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git sched-noprop-v2r3
head: 604b499ea0ea9edfafe842745723a200b2afce89
commit: ccb63a6012ccc292c6bbe7cb688c64596252fbd9 [3/4] sched/fair: select idle cpu from idle cpumask for task wakeup
config: i386-randconfig-s001-20210916 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git/commit/?id=ccb63a6012ccc292c6bbe7cb688c64596252fbd9
git remote add mel https://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git
git fetch --no-tags mel sched-noprop-v2r3
git checkout ccb63a6012ccc292c6bbe7cb688c64596252fbd9
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

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:862: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:862:34: sparse: expected struct sched_entity *se
kernel/sched/fair.c:862:34: sparse: got struct sched_entity [noderef] __rcu *
kernel/sched/fair.c:10867: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:10867:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:10867:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:5005:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:5005:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:5005:22: sparse: struct task_struct *
kernel/sched/fair.c:5531: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:5531:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:5531:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:5777:1: sparse: sparse: symbol '__pcpu_scope_load_balance_mask' was not declared. Should it be static?
kernel/sched/fair.c:5778:1: sparse: sparse: symbol '__pcpu_scope_select_idle_mask' was not declared. Should it be static?
kernel/sched/fair.c:6819: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:6819:20: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:6819:20: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:6953: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:6953:9: sparse: expected struct sched_domain *[assigned] tmp
kernel/sched/fair.c:6953:9: sparse: got struct sched_domain [noderef] __rcu *parent
>> kernel/sched/fair.c:7088: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:7088:12: sparse: expected struct sched_domain *sd
kernel/sched/fair.c:7088:12: sparse: got struct sched_domain [noderef] __rcu *
kernel/sched/fair.c:7185: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:7185:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:7185:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:7483: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:7483:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:7483:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:8468: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:8468:40: sparse: expected struct sched_domain *child
kernel/sched/fair.c:8468:40: sparse: got struct sched_domain [noderef] __rcu *child
kernel/sched/fair.c:8916:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:8916:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:8916:22: sparse: struct task_struct *
kernel/sched/fair.c:10179: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:10179:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:10179:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:9839: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:9839:44: sparse: expected struct sched_domain *sd_parent
kernel/sched/fair.c:9839:44: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:10251: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:10251:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:10251:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c: note: in included file:
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: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 +7088 kernel/sched/fair.c

7062
7063 /*
7064 * Update cpu idle state and record this information
7065 * in sd_llc_shared->idle_cpus_span.
7066 *
7067 * This function is called with interrupts disabled.
7068 */
7069 void update_idle_cpumask(int cpu, bool idle)
7070 {
7071 struct sched_domain *sd;
7072 struct rq *rq = cpu_rq(cpu);
7073 int idle_state;
7074
7075 /*
7076 * Also set SCHED_IDLE cpu in idle cpumask to
7077 * allow SCHED_IDLE cpu as a wakeup target.
7078 */
7079 idle_state = idle || sched_idle_cpu(cpu);
7080 /*
7081 * No need to update idle cpumask if the state
7082 * does not change.
7083 */
7084 if (rq->last_idle_state == idle_state)
7085 return;
7086
7087 rcu_read_lock();
> 7088 sd = per_cpu(sd_llc, cpu);
7089 if (unlikely(!sd))
7090 goto unlock;
7091
7092 if (idle_state)
7093 cpumask_set_cpu(cpu, sds_idle_cpus(sd->shared));
7094 else
7095 cpumask_clear_cpu(cpu, sds_idle_cpus(sd->shared));
7096
7097 rq->last_idle_state = idle_state;
7098 unlock:
7099 rcu_read_unlock();
7100 }
7101 #endif /* CONFIG_SMP */
7102

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

Attachment: .config.gz
Description: application/gzip