tree:
https://github.com/zen-kernel/zen-kernel 5.14/prjc
head: d549588e3d79002f0c4b567b49644318af78a3db
commit: 0ffe7639e645a6c63351dadeaaf22fef46cbbb40 [93/209] sched/alt: Sync up missing new
interfaces.
config: mips-allyesconfig (attached as .config)
compiler: mips-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/0ffe7639e645a6c63351dadea...
git remote add zen
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.14/prjc
git checkout 0ffe7639e645a6c63351dadeaaf22fef46cbbb40
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
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:3726:28: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
3726 | prev_state = prev->state;
| ^~~~~
| __state
kernel/sched/alt_core.c:3727:59: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
3727 | if (!preempt && prev_state && prev_state ==
prev->state) {
| ^~~~~
| __state
kernel/sched/alt_core.c:3729:31: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
3729 | prev->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: In function 'sched_submit_work':
kernel/sched/alt_core.c:3828:19: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
3828 | if (!tsk->state)
| ^~~~~
| __state
In file included from include/asm-generic/bug.h:7,
from arch/mips/include/asm/bug.h:42,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
kernel/sched/alt_core.c: In function 'schedule_idle':
kernel/sched/alt_core.c:3903:31: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
3903 | WARN_ON_ONCE(current->state);
| ^~~~~
include/linux/once_lite.h:15:41: note: in definition of macro
'DO_ONCE_LITE_IF'
15 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
kernel/sched/alt_core.c:3903:9: note: in expansion of macro 'WARN_ON_ONCE'
3903 | WARN_ON_ONCE(current->state);
| ^~~~~~~~~~~~
kernel/sched/alt_core.c: In function '__sched_setscheduler':
kernel/sched/alt_core.c:4425:46: error: 'MAX_USER_RT_PRIO' undeclared (first
use in this function); did you mean 'MAX_RT_PRIO'?
4425 | (p->mm && attr->sched_priority > MAX_USER_RT_PRIO
- 1) ||
| ^~~~~~~~~~~~~~~~
| MAX_RT_PRIO
kernel/sched/alt_core.c:4425: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:5475:18: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5475 | if (!(p->state & state_filter))
| ^~~~~
| __state
kernel/sched/alt_core.c:5482:56: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5482 | if (state_filter == TASK_UNINTERRUPTIBLE && p->state ==
TASK_IDLE)
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5489:6: error: conflicting types for
'show_state_filter'; have 'void(long unsigned int)'
5489 | 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:5548:15: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
5548 | idle->state = TASK_RUNNING;
| ^~~~~
| __state
kernel/sched/alt_core.c: At top level:
kernel/sched/alt_core.c:5622:6: warning: no previous prototype for
'idle_task_exit' [-Wmissing-prototypes]
5622 | void idle_task_exit(void)
| ^~~~~~~~~~~~~~
kernel/sched/alt_core.c:5771:5: warning: no previous prototype for
'sched_cpu_activate' [-Wmissing-prototypes]
5771 | int sched_cpu_activate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5804:5: warning: no previous prototype for
'sched_cpu_deactivate' [-Wmissing-prototypes]
5804 | int sched_cpu_deactivate(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5847:5: warning: no previous prototype for
'sched_cpu_starting' [-Wmissing-prototypes]
5847 | int sched_cpu_starting(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~
> kernel/sched/alt_core.c:5867:5: warning: no previous prototype
for 'sched_cpu_wait_empty' [-Wmissing-prototypes]
5867 | int
sched_cpu_wait_empty(unsigned int cpu)
| ^~~~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5872:5: warning: no previous prototype for
'sched_cpu_dying' [-Wmissing-prototypes]
5872 | int sched_cpu_dying(unsigned int cpu)
| ^~~~~~~~~~~~~~~
kernel/sched/alt_core.c: In function 'sched_init_topology_cpumask':
kernel/sched/alt_core.c:5941:57: error: implicit declaration of function
'cpu_coregroup_mask' [-Werror=implicit-function-declaration]
5941 | per_cpu(sd_llc_id, cpu) =
cpumask_first(cpu_coregroup_mask(cpu));
| ^~~~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:5941:57: warning: passing argument 1 of 'cpumask_first'
makes pointer from integer without a cast [-Wint-conversion]
5941 | per_cpu(sd_llc_id, cpu) =
cpumask_first(cpu_coregroup_mask(cpu));
|
^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
In file included from arch/mips/include/asm/processor.h:15,
from arch/mips/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
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:5943:45: warning: passing argument 3 of 'cpumask_and'
makes pointer from integer without a cast [-Wint-conversion]
5943 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5917:35: note: in definition of macro
'TOPOLOGY_CPUMASK'
5917 | if (cpumask_and(chk, chk, mask)) {
\
| ^~~~
In file included from arch/mips/include/asm/processor.h:15,
from arch/mips/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
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:5943:45: warning: passing argument 2 of 'cpumask_copy'
makes pointer from integer without a cast [-Wint-conversion]
5943 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5918:36: note: in definition of macro
'TOPOLOGY_CPUMASK'
5918 | cpumask_copy(topo, mask);
\
| ^~~~
In file included from arch/mips/include/asm/processor.h:15,
from arch/mips/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
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:5943:45: warning: passing argument 2 of
'cpumask_complement' makes pointer from integer without a cast [-Wint-conversion]
5943 | TOPOLOGY_CPUMASK(coregroup, cpu_coregroup_mask(cpu), false);
| ^~~~~~~~~~~~~~~~~~~~~~~
| |
| int
kernel/sched/alt_core.c:5923:41: note: in definition of macro
'TOPOLOGY_CPUMASK'
5923 | cpumask_complement(chk, mask)
| ^~~~
In file included from arch/mips/include/asm/processor.h:15,
from arch/mips/include/asm/thread_info.h:16,
from include/linux/thread_info.h:60,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
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)
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
In file included from include/asm-generic/bug.h:7,
from arch/mips/include/asm/bug.h:42,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/current.h:5,
from ./arch/mips/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/kthread.h:6,
from include/trace/events/sched.h:8,
from kernel/sched/alt_core.c:15:
kernel/sched/alt_core.c: In function '__might_sleep':
kernel/sched/alt_core.c:6101:28: error: 'struct task_struct' has no member
named 'state'; did you mean '__state'?
6101 | WARN_ONCE(current->state != TASK_RUNNING &&
current->task_state_change,
| ^~~~~
vim +/sched_cpu_wait_empty +5867 kernel/sched/alt_core.c
5770
5771 int sched_cpu_activate(unsigned int cpu)
5772 {
5773 struct rq *rq = cpu_rq(cpu);
5774 unsigned long flags;
5775
5776 #ifdef CONFIG_SCHED_SMT
5777 /*
5778 * When going up, increment the number of cores with SMT present.
5779 */
5780 if (cpumask_weight(cpu_smt_mask(cpu)) == 2)
5781 static_branch_inc_cpuslocked(&sched_smt_present);
5782 #endif
5783 set_cpu_active(cpu, true);
5784
5785 if (sched_smp_initialized)
5786 cpuset_cpu_active();
5787
5788 /*
5789 * Put the rq online, if not already. This happens:
5790 *
5791 * 1) In the early boot process, because we build the real domains
5792 * after all cpus have been brought up.
5793 *
5794 * 2) At runtime, if cpuset_cpu_active() fails to rebuild the
5795 * domains.
5796 */
5797 raw_spin_lock_irqsave(&rq->lock, flags);
5798 set_rq_online(rq);
5799 raw_spin_unlock_irqrestore(&rq->lock, flags);
5800
5801 return 0;
5802 }
5803
5804 int sched_cpu_deactivate(unsigned int cpu)
5805 {
5806 int ret;
5807
5808 set_cpu_active(cpu, false);
5809 /*
5810 * We've cleared cpu_active_mask, wait for all preempt-disabled and RCU
5811 * users of this state to go away such that all new such users will
5812 * observe it.
5813 *
5814 * Do sync before park smpboot threads to take care the rcu boost case.
5815 */
5816 synchronize_rcu();
5817
5818 #ifdef CONFIG_SCHED_SMT
5819 /*
5820 * When going down, decrement the number of cores with SMT present.
5821 */
5822 if (cpumask_weight(cpu_smt_mask(cpu)) == 2) {
5823 static_branch_dec_cpuslocked(&sched_smt_present);
5824 if (!static_branch_likely(&sched_smt_present))
5825 cpumask_clear(&sched_sg_idle_mask);
5826 }
5827 #endif
5828
5829 if (!sched_smp_initialized)
5830 return 0;
5831
5832 ret = cpuset_cpu_inactive(cpu);
5833 if (ret) {
5834 set_cpu_active(cpu, true);
5835 return ret;
5836 }
5837 return 0;
5838 }
5839
5840 static void sched_rq_cpu_starting(unsigned int cpu)
5841 {
5842 struct rq *rq = cpu_rq(cpu);
5843
5844 rq->calc_load_update = calc_load_update;
5845 }
5846
5847 int sched_cpu_starting(unsigned int cpu)
5848 {
5849 sched_rq_cpu_starting(cpu);
5850 sched_tick_start(cpu);
5851 return 0;
5852 }
5853
5854 #ifdef CONFIG_HOTPLUG_CPU
5855
5856 /*
5857 * Invoked immediately before the stopper thread is invoked to bring the
5858 * CPU down completely. At this point all per CPU kthreads except the
5859 * hotplug thread (current) and the stopper thread (inactive) have been
5860 * either parked or have been unbound from the outgoing CPU. Ensure that
5861 * any of those which might be on the way out are gone.
5862 *
5863 * If after this point a bound task is being woken on this CPU then the
5864 * responsible hotplug callback has failed to do it's job.
5865 * sched_cpu_dying() will catch it with the appropriate fireworks.
5866 */
5867 int sched_cpu_wait_empty(unsigned int cpu)
5868 {
5869 return 0;
5870 }
5871
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org