tree:
https://github.com/zen-kernel/zen-kernel 5.14/prjc
head: d549588e3d79002f0c4b567b49644318af78a3db
commit: b1646d9ef74f7aa37c45e92fec16555680614cf7 [82/209] sched/alt: Introduce
sched_cpu_topo_masks.
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.0
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
#
https://github.com/zen-kernel/zen-kernel/commit/b1646d9ef74f7aa37c45e92fe...
git remote add zen-kernel-zen-kernel
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen-kernel-zen-kernel 5.14/prjc
git checkout b1646d9ef74f7aa37c45e92fec16555680614cf7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/sched/alt_core.c:4421:46: error: 'MAX_USER_RT_PRIO' undeclared (first
use in this function); did you mean 'MAX_RT_PRIO'?
4421 | (p->mm && attr->sched_priority > MAX_USER_RT_PRIO
- 1) ||
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c:4421:46: note: each undeclared identifier is reported only once
for each function it appears in
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5183:13: error: redefinition of '_cond_resched'
5183 | int __sched _cond_resched(void)
| ^~~~~~~~~~~~~
In file included from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/sched.h:1957:19: note: previous definition of '_cond_resched'
with type 'int(void)'
1957 | static inline int _cond_resched(void)
| ^~~~~~~~~~~~~
kernel/sched/alt_core.c: In function '__do_sys_sched_get_priority_max':
kernel/sched/alt_core.c:5336:23: error: 'MAX_USER_RT_PRIO' undeclared (first
use in this function); did you mean 'MAX_RT_PRIO'?
5336 | ret = MAX_USER_RT_PRIO-1;
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c: In function 'sched_show_task':
kernel/sched/alt_core.c:5446:16: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5446 | if (p->state == TASK_RUNNING)
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'state_filter_match':
kernel/sched/alt_core.c:5474:18: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5474 | if (!(p->state & state_filter))
| ^~~~~
| __state
kernel/sched/alt_core.c:5481:56: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5481 | if (state_filter == TASK_UNINTERRUPTIBLE && p->state ==
TASK_IDLE)
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5488:6: error: conflicting types for
'show_state_filter'; have 'void(long unsigned int)'
5488 | void show_state_filter(unsigned long state_filter)
| ^~~~~~~~~~~~~~~~~
In file included from kernel/sched/alt_sched.h:9,
from kernel/sched/sched.h:6,
from kernel/sched/alt_core.c:18:
include/linux/sched/debug.h:17:13: note: previous declaration of
'show_state_filter' with type 'void(unsigned int)'
17 | extern void show_state_filter(unsigned int state_filter);
| ^~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'init_idle':
kernel/sched/alt_core.c:5547:15: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5547 | idle->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5770:5: warning: no previous prototype for
'sched_cpu_activate' [-Wmissing-prototypes]
5770 | int sched_cpu_activate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5803:5: warning: no previous prototype for
'sched_cpu_deactivate' [-Wmissing-prototypes]
5803 | int sched_cpu_deactivate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5846:5: warning: no previous prototype for
'sched_cpu_starting' [-Wmissing-prototypes]
5846 | int sched_cpu_starting(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'sched_init_topology_cpumask':
kernel/sched/alt_core.c:5923:57: error: implicit declaration of function
'cpu_coregroup_mask' [-Werror=implicit-function-declaration]
5923 | per_cpu(sd_llc_id, cpu) =
cpumask_first(cpu_coregroup_mask(cpu));
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5923:57: warning: passing argument 1 of 'cpumask_first'
makes pointer from integer without a cast [-Wint-conversion]
5923 | per_cpu(sd_llc_id, cpu) =
cpumask_first(cpu_coregroup_mask(cpu));
|
^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:193:64: note: expected 'const struct cpumask *' but
argument is of type 'int'
193 | static inline unsigned int cpumask_first(const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/alt_core.c:5925:45: warning: passing argument 3 of 'cpumask_and'
makes pointer from integer without a cast [-Wint-conversion]
5925 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5899:35: note: in definition of macro
'TOPOLOGY_CPUMASK'
5899 | if (cpumask_and(chk, chk, mask)) {
\
| ^~~~
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:403:54: note: expected 'const struct cpumask *' but
argument is of type 'int'
403 | const struct cpumask *src2p)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~
> kernel/sched/alt_core.c:5925:45: warning: passing argument 2 of
'cpumask_copy' makes pointer from integer without a cast [-Wint-conversion]
5925 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5900:36: note: in definition of macro
'TOPOLOGY_CPUMASK'
5900 | cpumask_copy(topo, mask);
\
| ^~~~
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:575:55: note: expected 'const struct cpumask *' but
argument is of type 'int'
575 | const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/alt_core.c:5925:45: warning: passing argument 2 of
'cpumask_complement' makes pointer from integer without a cast [-Wint-conversion]
5925 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5905:41: note: in definition of macro
'TOPOLOGY_CPUMASK'
5905 | cpumask_complement(chk, mask)
| ^~~~
In file included from include/linux/smp.h:13,
from include/linux/lockdep.h:14,
from include/linux/rcupdate.h:29,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
include/linux/cpumask.h:458:61: note: expected 'const struct cpumask *' but
argument is of type 'int'
458 | const struct cpumask *srcp)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:6258:20: warning: no previous prototype for
'sched_create_group' [-Wmissing-prototypes]
6258 | struct task_group *sched_create_group(struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6269:6: warning: no previous prototype for
'sched_online_group' [-Wmissing-prototypes]
6269 | void sched_online_group(struct task_group *tg, struct task_group *parent)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6280:6: warning: no previous prototype for
'sched_destroy_group' [-Wmissing-prototypes]
6280 | void sched_destroy_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6286:6: warning: no previous prototype for
'sched_offline_group' [-Wmissing-prototypes]
6286 | void sched_offline_group(struct task_group *tg)
| ^~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6378:27: warning: initialized field overwritten
[-Woverride-init]
6378 | .legacy_cftypes = cpu_legacy_files,
| ^~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:6378:27: note: (near initialization for
'cpu_cgrp_subsys.legacy_cftypes')
cc1: some warnings being treated as errors
vim +/cpumask_copy +5925 kernel/sched/alt_core.c
f746b5817d3274 Alfred Chen 2019-08-19 5897
f746b5817d3274 Alfred Chen 2019-08-19 5898 #define TOPOLOGY_CPUMASK(name, mask, last) \
b1646d9ef74f7a Alfred Chen 2020-12-25 5899 if (cpumask_and(chk, chk, mask)) { \
b1646d9ef74f7a Alfred Chen 2020-12-25 5900 cpumask_copy(topo, mask); \
b1646d9ef74f7a Alfred Chen 2020-12-25 5901 printk(KERN_INFO "sched: cpu#%02d
affinity: 0x%08lx topo: 0x%08lx - "#name,\
b1646d9ef74f7a Alfred Chen 2020-12-25 5902 cpu, (chk++)->bits[0],
(topo++)->bits[0]); \
b1646d9ef74f7a Alfred Chen 2020-12-25 5903 } \
f746b5817d3274 Alfred Chen 2019-08-19 5904 if (!last) \
f746b5817d3274 Alfred Chen 2019-08-19 5905 cpumask_complement(chk, mask)
f746b5817d3274 Alfred Chen 2019-08-19 5906
f746b5817d3274 Alfred Chen 2019-08-19 5907 static void
sched_init_topology_cpumask(void)
f746b5817d3274 Alfred Chen 2019-08-19 5908 {
f746b5817d3274 Alfred Chen 2019-08-19 5909 int cpu;
b1646d9ef74f7a Alfred Chen 2020-12-25 5910 cpumask_t *chk, *topo;
f746b5817d3274 Alfred Chen 2019-08-19 5911
f746b5817d3274 Alfred Chen 2019-08-19 5912 for_each_online_cpu(cpu) {
f746b5817d3274 Alfred Chen 2019-08-19 5913 /* take chance to reset time slice for idle
tasks */
f746b5817d3274 Alfred Chen 2019-08-19 5914 cpu_rq(cpu)->idle->time_slice =
sched_timeslice_ns;
f746b5817d3274 Alfred Chen 2019-08-19 5915
ec85ae6803b20e Alfred Chen 2020-12-04 5916 chk = per_cpu(sched_cpu_affinity_masks,
cpu) + 1;
b1646d9ef74f7a Alfred Chen 2020-12-25 5917 topo = per_cpu(sched_cpu_topo_masks, cpu) +
1;
442b9acb28e362 Alfred Chen 2020-11-09 5918
f746b5817d3274 Alfred Chen 2019-08-19 5919 cpumask_complement(chk, cpumask_of(cpu));
f746b5817d3274 Alfred Chen 2019-08-19 5920 #ifdef CONFIG_SCHED_SMT
f746b5817d3274 Alfred Chen 2019-08-19 5921 TOPOLOGY_CPUMASK(smt,
topology_sibling_cpumask(cpu), false);
f746b5817d3274 Alfred Chen 2019-08-19 5922 #endif
f746b5817d3274 Alfred Chen 2019-08-19 5923 per_cpu(sd_llc_id, cpu) =
cpumask_first(cpu_coregroup_mask(cpu));
b1646d9ef74f7a Alfred Chen 2020-12-25 5924 per_cpu(sched_cpu_llc_mask, cpu) = topo;
f746b5817d3274 Alfred Chen 2019-08-19 @5925 TOPOLOGY_CPUMASK(coregroup,
cpu_coregroup_mask(cpu), false);
f746b5817d3274 Alfred Chen 2019-08-19 5926
f746b5817d3274 Alfred Chen 2019-08-19 5927 TOPOLOGY_CPUMASK(core,
topology_core_cpumask(cpu), false);
f746b5817d3274 Alfred Chen 2019-08-19 5928
f746b5817d3274 Alfred Chen 2019-08-19 5929 TOPOLOGY_CPUMASK(others, cpu_online_mask,
true);
f746b5817d3274 Alfred Chen 2019-08-19 5930
f746b5817d3274 Alfred Chen 2019-08-19 5931 per_cpu(sched_cpu_affinity_end_mask, cpu) =
chk;
e9b96fa32fab04 Alfred Chen 2020-11-03 5932 printk(KERN_INFO "sched: cpu#%02d
llc_id = %d, llc_mask idx = %d\n",
e9b96fa32fab04 Alfred Chen 2020-11-03 5933 cpu, per_cpu(sd_llc_id, cpu),
e9b96fa32fab04 Alfred Chen 2020-11-03 5934 (int) (per_cpu(sched_cpu_llc_mask,
cpu) -
b1646d9ef74f7a Alfred Chen 2020-12-25 5935 per_cpu(sched_cpu_topo_masks,
cpu)));
f746b5817d3274 Alfred Chen 2019-08-19 5936 }
f746b5817d3274 Alfred Chen 2019-08-19 5937 }
f746b5817d3274 Alfred Chen 2019-08-19 5938 #endif
f746b5817d3274 Alfred Chen 2019-08-19 5939
:::::: The code at line 5925 was first introduced by commit
:::::: f746b5817d3274fa4f458f87f6b452e7304b1d64 Project C v5.7.5-r2
:::::: TO: Alfred Chen <cchalpha(a)gmail.com>
:::::: CC: Alfred Chen <cchalpha(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org