* [peterz-queue:sched/core-sched 41/42] kernel/sched/core.c:381:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean
@ 2021-03-02 17:51 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-02 17:51 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 14202 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core-sched
head: 5e50471743a68f484b7d1ad91c7fd809f6a30145
commit: 2b9410cf5104df69fceb025cc73d7a0d97bd8aa7 [41/42] sched: Prepare to drop stop_machine() for core sched
config: riscv-randconfig-r022-20210302 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5de09ef02e24d234d9fc0cd1c6dfe18a1bb784b0)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=2b9410cf5104df69fceb025cc73d7a0d97bd8aa7
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core-sched
git checkout 2b9410cf5104df69fceb025cc73d7a0d97bd8aa7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> kernel/sched/core.c:381:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled)) {
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:469:43: note: expanded from macro 'static_branch_unlikely'
if (__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
>> kernel/sched/core.c:381:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled)) {
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:470:38: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch_jump(&(x)->key, false); \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
>> kernel/sched/core.c:381:7: error: member reference base type 'bool (struct rq *)' (aka '_Bool (struct rq *)') is not a structure or union
if (!static_branch_unlikely(&__sched_core_enabled)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:470:40: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch_jump(&(x)->key, false); \
~~~^ ~~~
>> kernel/sched/core.c:381:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled)) {
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:471:48: note: expanded from macro 'static_branch_unlikely'
else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
>> kernel/sched/core.c:381:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled)) {
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:472:33: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch(&(x)->key, false); \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
>> kernel/sched/core.c:381:7: error: member reference base type 'bool (struct rq *)' (aka '_Bool (struct rq *)') is not a structure or union
if (!static_branch_unlikely(&__sched_core_enabled)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch(&(x)->key, false); \
~~~^ ~~~
kernel/sched/core.c:400:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled))
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:469:43: note: expanded from macro 'static_branch_unlikely'
if (__builtin_types_compatible_p(typeof(*x), struct static_key_true)) \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
kernel/sched/core.c:400:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled))
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:470:38: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch_jump(&(x)->key, false); \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
kernel/sched/core.c:400:7: error: member reference base type 'bool (struct rq *)' (aka '_Bool (struct rq *)') is not a structure or union
if (!static_branch_unlikely(&__sched_core_enabled))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:470:40: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch_jump(&(x)->key, false); \
~~~^ ~~~
kernel/sched/core.c:400:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled))
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:471:48: note: expanded from macro 'static_branch_unlikely'
else if (__builtin_types_compatible_p(typeof(*x), struct static_key_false)) \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
kernel/sched/core.c:400:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean 'sched_core_enabled'?
if (!static_branch_unlikely(&__sched_core_enabled))
^~~~~~~~~~~~~~~~~~~~
sched_core_enabled
include/linux/jump_label.h:472:33: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch(&(x)->key, false); \
^
kernel/sched/sched.h:1152:20: note: 'sched_core_enabled' declared here
static inline bool sched_core_enabled(struct rq *rq)
^
kernel/sched/core.c:400:7: error: member reference base type 'bool (struct rq *)' (aka '_Bool (struct rq *)') is not a structure or union
if (!static_branch_unlikely(&__sched_core_enabled))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/jump_label.h:472:35: note: expanded from macro 'static_branch_unlikely'
branch = arch_static_branch(&(x)->key, false); \
~~~^ ~~~
kernel/sched/core.c:3103:6: warning: no previous prototype for function 'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel/sched/core.c:3103:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
1 warning and 12 errors generated.
vim +381 kernel/sched/core.c
282
283
284 /*
285 * Serialization rules:
286 *
287 * Lock order:
288 *
289 * p->pi_lock
290 * rq->lock
291 * hrtimer_cpu_base->lock (hrtimer_start() for bandwidth controls)
292 *
293 * rq1->lock
294 * rq2->lock where: rq1 < rq2
295 *
296 * Regular state:
297 *
298 * Normal scheduling state is serialized by rq->lock. __schedule() takes the
299 * local CPU's rq->lock, it optionally removes the task from the runqueue and
300 * always looks at the local rq data structures to find the most eligible task
301 * to run next.
302 *
303 * Task enqueue is also under rq->lock, possibly taken from another CPU.
304 * Wakeups from another LLC domain might use an IPI to transfer the enqueue to
305 * the local CPU to avoid bouncing the runqueue state around [ see
306 * ttwu_queue_wakelist() ]
307 *
308 * Task wakeup, specifically wakeups that involve migration, are horribly
309 * complicated to avoid having to take two rq->locks.
310 *
311 * Special state:
312 *
313 * System-calls and anything external will use task_rq_lock() which acquires
314 * both p->pi_lock and rq->lock. As a consequence the state they change is
315 * stable while holding either lock:
316 *
317 * - sched_setaffinity()/
318 * set_cpus_allowed_ptr(): p->cpus_ptr, p->nr_cpus_allowed
319 * - set_user_nice(): p->se.load, p->*prio
320 * - __sched_setscheduler(): p->sched_class, p->policy, p->*prio,
321 * p->se.load, p->rt_priority,
322 * p->dl.dl_{runtime, deadline, period, flags, bw, density}
323 * - sched_setnuma(): p->numa_preferred_nid
324 * - sched_move_task()/
325 * cpu_cgroup_fork(): p->sched_task_group
326 * - uclamp_update_active() p->uclamp*
327 *
328 * p->state <- TASK_*:
329 *
330 * is changed locklessly using set_current_state(), __set_current_state() or
331 * set_special_state(), see their respective comments, or by
332 * try_to_wake_up(). This latter uses p->pi_lock to serialize against
333 * concurrent self.
334 *
335 * p->on_rq <- { 0, 1 = TASK_ON_RQ_QUEUED, 2 = TASK_ON_RQ_MIGRATING }:
336 *
337 * is set by activate_task() and cleared by deactivate_task(), under
338 * rq->lock. Non-zero indicates the task is runnable, the special
339 * ON_RQ_MIGRATING state is used for migration without holding both
340 * rq->locks. It indicates task_cpu() is not stable, see task_rq_lock().
341 *
342 * p->on_cpu <- { 0, 1 }:
343 *
344 * is set by prepare_task() and cleared by finish_task() such that it will be
345 * set before p is scheduled-in and cleared after p is scheduled-out, both
346 * under rq->lock. Non-zero indicates the task is running on its CPU.
347 *
348 * [ The astute reader will observe that it is possible for two tasks on one
349 * CPU to have ->on_cpu = 1 at the same time. ]
350 *
351 * task_cpu(p): is changed by set_task_cpu(), the rules are:
352 *
353 * - Don't call set_task_cpu() on a blocked task:
354 *
355 * We don't care what CPU we're not running on, this simplifies hotplug,
356 * the CPU assignment of blocked tasks isn't required to be valid.
357 *
358 * - for try_to_wake_up(), called under p->pi_lock:
359 *
360 * This allows try_to_wake_up() to only take one rq->lock, see its comment.
361 *
362 * - for migration called under rq->lock:
363 * [ see task_on_rq_migrating() in task_rq_lock() ]
364 *
365 * o move_queued_task()
366 * o detach_task()
367 *
368 * - for migration called under double_rq_lock():
369 *
370 * o __migrate_swap_task()
371 * o push_rt_task() / pull_rt_task()
372 * o push_dl_task() / pull_dl_task()
373 * o dl_task_offline_migration()
374 *
375 */
376
377 void raw_spin_rq_lock_nested(struct rq *rq, int subclass)
378 {
379 raw_spinlock_t *lock;
380
> 381 if (!static_branch_unlikely(&__sched_core_enabled)) {
382 raw_spin_lock_nested(&rq->__lock, subclass);
383 return;
384 }
385
386 for (;;) {
387 lock = rq_lockp(rq);
388 raw_spin_lock_nested(lock, subclass);
389 if (likely(lock == rq_lockp(rq)))
390 return;
391 raw_spin_unlock(lock);
392 }
393 }
394
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 27585 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-02 17:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02 17:51 [peterz-queue:sched/core-sched 41/42] kernel/sched/core.c:381:31: error: use of undeclared identifier '__sched_core_enabled'; did you mean kernel test robot
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.