[openeuler:OLK-6.6 2402/2402] kernel/cgroup/ifs.c:92:19: sparse: sparse: incorrect type in argument 1 (different address spaces)

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 852df0842f6ca5e0b4808eb4b1368aed4b492917 commit: edff31302c6d1f41a3da02c92118b06a203f3248 [2402/2402] interference: Add smt interference track support config: loongarch-randconfig-r112-20250617 (https://download.01.org/0day-ci/archive/20250617/202506171339.AD6u1vHW-lkp@i...) compiler: loongarch64-linux-gcc (GCC) 14.3.0 reproduce: (https://download.01.org/0day-ci/archive/20250617/202506171339.AD6u1vHW-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202506171339.AD6u1vHW-lkp@intel.com/ sparse warnings: (new ones prefixed by >>)
kernel/cgroup/ifs.c:92:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ kernel/cgroup/ifs.c:92:19: sparse: expected void *ptr kernel/cgroup/ifs.c:92:19: sparse: got int [noderef] __percpu * kernel/cgroup/ifs.c:92:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ kernel/cgroup/ifs.c:92:19: sparse: expected void *ptr kernel/cgroup/ifs.c:92:19: sparse: got int [noderef] __percpu * kernel/cgroup/ifs.c:92:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ kernel/cgroup/ifs.c:92:19: sparse: expected void *ptr kernel/cgroup/ifs.c:92:19: sparse: got int [noderef] __percpu * kernel/cgroup/ifs.c:92:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *ptr @@ got int [noderef] __percpu * @@ kernel/cgroup/ifs.c:92:19: sparse: expected void *ptr kernel/cgroup/ifs.c:92:19: sparse: got int [noderef] __percpu *
vim +92 kernel/cgroup/ifs.c 83 84 void cgroup_ifs_account_smttime(struct task_struct *prev, 85 struct task_struct *next, 86 struct task_struct *idle) 87 { 88 struct smt_info *ci, *si; 89 u64 now, delta; 90 int sibling; 91
92 sibling = this_cpu_read(smt_sibling); 93 if (sibling == -1 || prev == next) 94 return; 95 96 ci = this_cpu_ptr(&smt_info); 97 si = per_cpu_ptr(&smt_info, sibling); 98 99 now = sched_clock_cpu(smp_processor_id()); 100 101 /* leave noidle */ 102 if (prev != idle && next == idle) { 103 ci->is_noidle = false; 104 /* account interference time */ 105 if (ci->noidle_enter_time && si->is_noidle) { 106 delta = now - ci->noidle_enter_time; 107 108 ci->total_time += delta; 109 si->total_time += delta; 110 111 si->noidle_enter_time = 0; 112 ci->noidle_enter_time = 0; 113 114 account_smttime(prev); 115 } 116 /* enter noidle */ 117 } else if (prev == idle && next != idle) { 118 /* if the sibling is also nonidle, there is smt interference */ 119 if (si->is_noidle) { 120 ci->noidle_enter_time = now; 121 si->noidle_enter_time = now; 122 } 123 ci->is_noidle = true; 124 /* cgroup changed */ 125 } else if (task_ifs(prev) != task_ifs(next)) 126 account_smttime(prev); 127 } 128
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot