From: kernel test robot <lkp@intel.com>
To: Martin Weiss <martin.githubacc@gmail.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev,
Martin Weiss <Martin.weiss2410@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] trace_branch: use per-cpu counters for correct/incorrect stats
Date: Fri, 7 Aug 2026 03:38:25 +0800 [thread overview]
Message-ID: <202608070304.QNhu3z0S-lkp@intel.com> (raw)
In-Reply-To: <20260629095838.601926-1-Martin.weiss2410@gmail.com>
Hi Martin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on trace/for-next]
[also build test WARNING on linus/master v7.2-rc6 next-20260806]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Martin-Weiss/trace_branch-use-per-cpu-counters-for-correct-incorrect-stats/20260806-093445
base: https://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace for-next
patch link: https://lore.kernel.org/r/20260629095838.601926-1-Martin.weiss2410%40gmail.com
patch subject: [PATCH] trace_branch: use per-cpu counters for correct/incorrect stats
config: um-randconfig-r123-20260806 (https://download.01.org/0day-ci/archive/20260807/202608070304.QNhu3z0S-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260807/202608070304.QNhu3z0S-lkp@intel.com/reproduce)
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/202608070304.QNhu3z0S-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> kernel/trace/trace_branch.c:218:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:218:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:218:17: sparse: got unsigned long *
>> kernel/trace/trace_branch.c:218:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:218:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:218:17: sparse: got unsigned long *
>> kernel/trace/trace_branch.c:218:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:218:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:218:17: sparse: got unsigned long *
>> kernel/trace/trace_branch.c:218:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:218:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:218:17: sparse: got unsigned long *
>> kernel/trace/trace_branch.c:218:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:218:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:218:17: sparse: got unsigned long *
kernel/trace/trace_branch.c:220:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:220:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:220:17: sparse: got unsigned long *
kernel/trace/trace_branch.c:220:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:220:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:220:17: sparse: got unsigned long *
kernel/trace/trace_branch.c:220:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:220:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:220:17: sparse: got unsigned long *
kernel/trace/trace_branch.c:220:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:220:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:220:17: sparse: got unsigned long *
kernel/trace/trace_branch.c:220:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got unsigned long * @@
kernel/trace/trace_branch.c:220:17: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace_branch.c:220:17: sparse: got unsigned long *
vim +218 kernel/trace/trace_branch.c
197
198 void ftrace_likely_update(struct ftrace_likely_data *f, int val,
199 int expect, int is_constant)
200 {
201 unsigned long flags = user_access_save();
202
203 /* A constant is always correct */
204 if (is_constant) {
205 f->constant++;
206 val = expect;
207 }
208 /*
209 * I would love to have a trace point here instead, but the
210 * trace point code is so inundated with unlikely and likely
211 * conditions that the recursive nightmare that exists is too
212 * much to try to get working. At least for now.
213 */
214 trace_likely_condition(f, val, expect);
215
216 /* use per-cpu counters to avoid contention */
217 if (val == expect)
> 218 this_cpu_inc(f->data.correct);
219 else
220 this_cpu_inc(f->data.incorrect);
221
222 user_access_restore(flags);
223 }
224 EXPORT_SYMBOL(ftrace_likely_update);
225
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-08-06 19:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 9:58 Martin Weiss
2026-06-29 10:47 ` Steven Rostedt
2026-08-06 16:53 ` kernel test robot
2026-08-06 19:38 ` kernel test robot [this message]
2026-08-06 20:04 ` kernel test robot
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=202608070304.QNhu3z0S-lkp@intel.com \
--to=lkp@intel.com \
--cc=Martin.weiss2410@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.githubacc@gmail.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rostedt@goodmis.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®