From: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: powerpc64: move preempt count to paca
Date: Sat, 3 Oct 2026 15:51:01 +0800 [thread overview]
Message-ID: <202610031540.BVG5ql3j-lkp@intel.com> (raw)
In-Reply-To: <202610031540.BVG5ql3j-lkp@intel.com>
Hi Shrikanth,
kernel test robot noticed the following build warnings:
url: https://github.com/intel-lab-lkp/linux/commits/Shrikanth-Hegde/powerpc64-move-preempt-count-to-paca/20261002-221617
base:
patch link: https://lore.kernel.org/r/202610031540.BVG5ql3j-lkp%40intel.com
config: powerpc64-randconfig-1000-20261003 (https://download.01.org/0day-ci/archive/20261003/202610031540.BVG5ql3j-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 5f609f950d2e80addf5566623013db68394334db)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261003/202610031540.BVG5ql3j-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/202610031540.BVG5ql3j-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/sched/core.c:7502:22: warning: no previous prototype for function 'dynamic_preempt_schedule' [-Wmissing-prototypes]
7502 | void __sched notrace dynamic_preempt_schedule(void)
| ^
kernel/sched/core.c:7502:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
7502 | void __sched notrace dynamic_preempt_schedule(void)
| ^
| static
>> kernel/sched/core.c:7575:22: warning: no previous prototype for function 'dynamic_preempt_schedule_notrace' [-Wmissing-prototypes]
7575 | void __sched notrace dynamic_preempt_schedule_notrace(void)
| ^
kernel/sched/core.c:7575:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
7575 | void __sched notrace dynamic_preempt_schedule_notrace(void)
| ^
| static
2 warnings generated.
vim +/dynamic_preempt_schedule +7502 kernel/sched/core.c
009f60e2763568 Oleg Nesterov 2014-10-05 7491
2c9a98d3bc8087 Peter Zijlstra (Intel 2021-01-18 7492) #ifdef CONFIG_PREEMPT_DYNAMIC
b7ebb758568b60 Ingo Molnar 2025-05-28 7493 # ifdef CONFIG_HAVE_PREEMPT_DYNAMIC_CALL
8a69fe0be143b0 Mark Rutland 2022-02-14 7494 # ifndef preempt_schedule_dynamic_enabled
8a69fe0be143b0 Mark Rutland 2022-02-14 7495 # define preempt_schedule_dynamic_enabled preempt_schedule
8a69fe0be143b0 Mark Rutland 2022-02-14 7496 # define preempt_schedule_dynamic_disabled NULL
8a69fe0be143b0 Mark Rutland 2022-02-14 7497 # endif
8a69fe0be143b0 Mark Rutland 2022-02-14 7498 DEFINE_STATIC_CALL(preempt_schedule, preempt_schedule_dynamic_enabled);
ef72661e28c64a Peter Zijlstra 2021-01-25 7499 EXPORT_STATIC_CALL_TRAMP(preempt_schedule);
99cf983cc8bca4 Mark Rutland 2022-02-14 7500 # elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY)
99cf983cc8bca4 Mark Rutland 2022-02-14 7501 static DEFINE_STATIC_KEY_TRUE(sk_dynamic_preempt_schedule);
99cf983cc8bca4 Mark Rutland 2022-02-14 @7502 void __sched notrace dynamic_preempt_schedule(void)
99cf983cc8bca4 Mark Rutland 2022-02-14 7503 {
99cf983cc8bca4 Mark Rutland 2022-02-14 7504 if (!static_branch_unlikely(&sk_dynamic_preempt_schedule))
99cf983cc8bca4 Mark Rutland 2022-02-14 7505 return;
99cf983cc8bca4 Mark Rutland 2022-02-14 7506 preempt_schedule();
99cf983cc8bca4 Mark Rutland 2022-02-14 7507 }
99cf983cc8bca4 Mark Rutland 2022-02-14 7508 NOKPROBE_SYMBOL(dynamic_preempt_schedule);
99cf983cc8bca4 Mark Rutland 2022-02-14 7509 EXPORT_SYMBOL(dynamic_preempt_schedule);
99cf983cc8bca4 Mark Rutland 2022-02-14 7510 # endif
b7ebb758568b60 Ingo Molnar 2025-05-28 7511 #endif /* CONFIG_PREEMPT_DYNAMIC */
2c9a98d3bc8087 Peter Zijlstra (Intel 2021-01-18 7512)
009f60e2763568 Oleg Nesterov 2014-10-05 7513 /**
4eaca0a887eaee Frederic Weisbecker 2015-06-04 7514 * preempt_schedule_notrace - preempt_schedule called by tracing
009f60e2763568 Oleg Nesterov 2014-10-05 7515 *
009f60e2763568 Oleg Nesterov 2014-10-05 7516 * The tracing infrastructure uses preempt_enable_notrace to prevent
009f60e2763568 Oleg Nesterov 2014-10-05 7517 * recursion and tracing preempt enabling caused by the tracing
009f60e2763568 Oleg Nesterov 2014-10-05 7518 * infrastructure itself. But as tracing can happen in areas coming
009f60e2763568 Oleg Nesterov 2014-10-05 7519 * from userspace or just about to enter userspace, a preempt enable
009f60e2763568 Oleg Nesterov 2014-10-05 7520 * can occur before user_exit() is called. This will cause the scheduler
009f60e2763568 Oleg Nesterov 2014-10-05 7521 * to be called when the system is still in usermode.
009f60e2763568 Oleg Nesterov 2014-10-05 7522 *
009f60e2763568 Oleg Nesterov 2014-10-05 7523 * To prevent this, the preempt_enable_notrace will use this function
009f60e2763568 Oleg Nesterov 2014-10-05 7524 * instead of preempt_schedule() to exit user context if needed before
009f60e2763568 Oleg Nesterov 2014-10-05 7525 * calling the scheduler.
009f60e2763568 Oleg Nesterov 2014-10-05 7526 */
4eaca0a887eaee Frederic Weisbecker 2015-06-04 7527 asmlinkage __visible void __sched notrace preempt_schedule_notrace(void)
009f60e2763568 Oleg Nesterov 2014-10-05 7528 {
009f60e2763568 Oleg Nesterov 2014-10-05 7529 enum ctx_state prev_ctx;
009f60e2763568 Oleg Nesterov 2014-10-05 7530
009f60e2763568 Oleg Nesterov 2014-10-05 7531 if (likely(!preemptible()))
009f60e2763568 Oleg Nesterov 2014-10-05 7532 return;
009f60e2763568 Oleg Nesterov 2014-10-05 7533
009f60e2763568 Oleg Nesterov 2014-10-05 7534 do {
47252cfbac0364 Steven Rostedt 2016-03-21 7535 /*
47252cfbac0364 Steven Rostedt 2016-03-21 7536 * Because the function tracer can trace preempt_count_sub()
47252cfbac0364 Steven Rostedt 2016-03-21 7537 * and it also uses preempt_enable/disable_notrace(), if
47252cfbac0364 Steven Rostedt 2016-03-21 7538 * NEED_RESCHED is set, the preempt_enable_notrace() called
47252cfbac0364 Steven Rostedt 2016-03-21 7539 * by the function tracer will call this function again and
47252cfbac0364 Steven Rostedt 2016-03-21 7540 * cause infinite recursion.
47252cfbac0364 Steven Rostedt 2016-03-21 7541 *
47252cfbac0364 Steven Rostedt 2016-03-21 7542 * Preemption must be disabled here before the function
47252cfbac0364 Steven Rostedt 2016-03-21 7543 * tracer can trace. Break up preempt_disable() into two
47252cfbac0364 Steven Rostedt 2016-03-21 7544 * calls. One to disable preemption without fear of being
47252cfbac0364 Steven Rostedt 2016-03-21 7545 * traced. The other to still record the preemption latency,
47252cfbac0364 Steven Rostedt 2016-03-21 7546 * which can also be traced by the function tracer.
47252cfbac0364 Steven Rostedt 2016-03-21 7547 */
3d8f74dd4ca1da Peter Zijlstra 2015-09-28 7548 preempt_disable_notrace();
47252cfbac0364 Steven Rostedt 2016-03-21 7549 preempt_latency_start(1);
009f60e2763568 Oleg Nesterov 2014-10-05 7550 /*
009f60e2763568 Oleg Nesterov 2014-10-05 7551 * Needs preempt disabled in case user_exit() is traced
009f60e2763568 Oleg Nesterov 2014-10-05 7552 * and the tracer calls preempt_enable_notrace() causing
009f60e2763568 Oleg Nesterov 2014-10-05 7553 * an infinite recursion.
009f60e2763568 Oleg Nesterov 2014-10-05 7554 */
009f60e2763568 Oleg Nesterov 2014-10-05 7555 prev_ctx = exception_enter();
b4bfa3fcfe3b82 Thomas Gleixner 2021-08-15 7556 __schedule(SM_PREEMPT);
009f60e2763568 Oleg Nesterov 2014-10-05 7557 exception_exit(prev_ctx);
009f60e2763568 Oleg Nesterov 2014-10-05 7558
47252cfbac0364 Steven Rostedt 2016-03-21 7559 preempt_latency_stop(1);
3d8f74dd4ca1da Peter Zijlstra 2015-09-28 7560 preempt_enable_no_resched_notrace();
009f60e2763568 Oleg Nesterov 2014-10-05 7561 } while (need_resched());
009f60e2763568 Oleg Nesterov 2014-10-05 7562 }
4eaca0a887eaee Frederic Weisbecker 2015-06-04 7563 EXPORT_SYMBOL_GPL(preempt_schedule_notrace);
009f60e2763568 Oleg Nesterov 2014-10-05 7564
2c9a98d3bc8087 Peter Zijlstra (Intel 2021-01-18 7565) #ifdef CONFIG_PREEMPT_DYNAMIC
99cf983cc8bca4 Mark Rutland 2022-02-14 7566 # if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL)
8a69fe0be143b0 Mark Rutland 2022-02-14 7567 # ifndef preempt_schedule_notrace_dynamic_enabled
8a69fe0be143b0 Mark Rutland 2022-02-14 7568 # define preempt_schedule_notrace_dynamic_enabled preempt_schedule_notrace
8a69fe0be143b0 Mark Rutland 2022-02-14 7569 # define preempt_schedule_notrace_dynamic_disabled NULL
2c9a98d3bc8087 Peter Zijlstra (Intel 2021-01-18 7570) # endif
8a69fe0be143b0 Mark Rutland 2022-02-14 7571 DEFINE_STATIC_CALL(preempt_schedule_notrace, preempt_schedule_notrace_dynamic_enabled);
ef72661e28c64a Peter Zijlstra 2021-01-25 7572 EXPORT_STATIC_CALL_TRAMP(preempt_schedule_notrace);
99cf983cc8bca4 Mark Rutland 2022-02-14 7573 # elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY)
99cf983cc8bca4 Mark Rutland 2022-02-14 7574 static DEFINE_STATIC_KEY_TRUE(sk_dynamic_preempt_schedule_notrace);
99cf983cc8bca4 Mark Rutland 2022-02-14 @7575 void __sched notrace dynamic_preempt_schedule_notrace(void)
c597bfddc9e9e8 Frederic Weisbecker 2021-09-14 7576 {
99cf983cc8bca4 Mark Rutland 2022-02-14 7577 if (!static_branch_unlikely(&sk_dynamic_preempt_schedule_notrace))
99cf983cc8bca4 Mark Rutland 2022-02-14 7578 return;
99cf983cc8bca4 Mark Rutland 2022-02-14 7579 preempt_schedule_notrace();
c597bfddc9e9e8 Frederic Weisbecker 2021-09-14 7580 }
99cf983cc8bca4 Mark Rutland 2022-02-14 7581 NOKPROBE_SYMBOL(dynamic_preempt_schedule_notrace);
99cf983cc8bca4 Mark Rutland 2022-02-14 7582 EXPORT_SYMBOL(dynamic_preempt_schedule_notrace);
99cf983cc8bca4 Mark Rutland 2022-02-14 7583 # endif
2c9a98d3bc8087 Peter Zijlstra (Intel 2021-01-18 7584) #endif
c597bfddc9e9e8 Frederic Weisbecker 2021-09-14 7585
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2026-10-03 7:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 7:51 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-03 10:34 powerpc64: move preempt count to paca 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=202610031540.BVG5ql3j-lkp@intel.com \
--to=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.