From: kernel test robot <lkp@intel.com>
To: Josh Don <joshdon@google.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
x86@kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: [tip:sched/core 3/8] kernel/sched/core_sched.c:278:37: sparse: sparse: incompatible types in conditional expression (different address spaces):
Date: Tue, 30 Nov 2021 19:59:38 +0800 [thread overview]
Message-ID: <202111301958.OvjPxCJ2-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core
head: 8c92606ab81086db00cbb73347d124b4eb169b7e
commit: 4feee7d12603deca8775f9f9ae5e121093837444 [3/8] sched/core: Forced idle accounting
config: i386-randconfig-s001-20211128 (https://download.01.org/0day-ci/archive/20211130/202111301958.OvjPxCJ2-lkp@intel.com/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/tip/tip.git/commit/?id=4feee7d12603deca8775f9f9ae5e121093837444
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip sched/core
git checkout 4feee7d12603deca8775f9f9ae5e121093837444
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash kernel/sched/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> kernel/sched/core_sched.c:278:37: sparse: sparse: incompatible types in conditional expression (different address spaces):
>> kernel/sched/core_sched.c:278:37: sparse: struct task_struct *
>> kernel/sched/core_sched.c:278:37: sparse: struct task_struct [noderef] __rcu *
kernel/sched/core_sched.c: note: in included file:
kernel/sched/sched.h:1185:30: sparse: sparse: context imbalance in 'sched_core_update_cookie' - wrong count at exit
vim +278 kernel/sched/core_sched.c
240
241 /* REQUIRES: rq->core's clock recently updated. */
242 void __sched_core_account_forceidle(struct rq *rq)
243 {
244 const struct cpumask *smt_mask = cpu_smt_mask(cpu_of(rq));
245 u64 delta, now = rq_clock(rq->core);
246 struct rq *rq_i;
247 struct task_struct *p;
248 int i;
249
250 lockdep_assert_rq_held(rq);
251
252 WARN_ON_ONCE(!rq->core->core_forceidle_count);
253
254 if (rq->core->core_forceidle_start == 0)
255 return;
256
257 delta = now - rq->core->core_forceidle_start;
258 if (unlikely((s64)delta <= 0))
259 return;
260
261 rq->core->core_forceidle_start = now;
262
263 if (WARN_ON_ONCE(!rq->core->core_forceidle_occupation)) {
264 /* can't be forced idle without a running task */
265 } else if (rq->core->core_forceidle_count > 1 ||
266 rq->core->core_forceidle_occupation > 1) {
267 /*
268 * For larger SMT configurations, we need to scale the charged
269 * forced idle amount since there can be more than one forced
270 * idle sibling and more than one running cookied task.
271 */
272 delta *= rq->core->core_forceidle_count;
273 delta = div_u64(delta, rq->core->core_forceidle_occupation);
274 }
275
276 for_each_cpu(i, smt_mask) {
277 rq_i = cpu_rq(i);
> 278 p = rq_i->core_pick ?: rq_i->curr;
279
280 if (!p->core_cookie)
281 continue;
282
283 __schedstat_add(p->stats.core_forceidle_sum, delta);
284 }
285 }
286
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2021-11-30 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202111301958.OvjPxCJ2-lkp@intel.com \
--to=lkp@intel.com \
--cc=joshdon@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®