tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head: c259747b4f3c520a2cd6fff8fbed5f63355ce07f
commit: 0fe13b0a941b5e6adc57431cc380cef82dde314c [2/4] FIXUP: CHROMIUM: sched: Add a
per-thread core scheduling interface
config: x86_64-randconfig-a014-20210712 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
8d69635ed9ecf36fd0ca85906bfde17949671cbe)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add chrome-os
https://chromium.googlesource.com/chromiumos/third_party/kernel
git fetch --no-tags chrome-os chromeos-5.4
git checkout 0fe13b0a941b5e6adc57431cc380cef82dde314c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/core.c:2725: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:2725: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
kernel/sched/core.c:5387:35: warning: no previous prototype for function
'schedule_user' [-Wmissing-prototypes]
asmlinkage __visible void __sched schedule_user(void)
^
kernel/sched/core.c:5387:22: note: declare 'static' if the function is not
intended to be used outside of this translation unit
asmlinkage __visible void __sched schedule_user(void)
^
static
> kernel/sched/core.c:8178:25: warning: equality comparison with
extraneous parentheses [-Wparentheses-equality]
if
((tsk->core_cookie == (unsigned long)tsk)
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
kernel/sched/core.c:8178:25: note: remove extraneous parentheses around the comparison
to silence this warning
if ((tsk->core_cookie == (unsigned long)tsk)
~ ^ ~
kernel/sched/core.c:8178:25: note: use '=' to turn this equality comparison
into an assignment
if ((tsk->core_cookie == (unsigned long)tsk)
^~
=
kernel/sched/core.c:1249:28: warning: unused function
'uclamp_bucket_base_value' [-Wunused-function]
static inline unsigned int uclamp_bucket_base_value(unsigned int clamp_value)
^
kernel/sched/core.c:1592:1: warning: unused function 'uclamp_update_active'
[-Wunused-function]
uclamp_update_active(struct task_struct *p, enum uclamp_id clamp_id)
^
5 warnings generated.
vim +8178 kernel/sched/core.c
8148
8149 int task_set_core_sched(int set, struct task_struct *tsk,
8150 unsigned long cookie)
8151 {
8152 if (!tsk)
8153 tsk = current;
8154
8155 if (set != 0 && set != 1)
8156 return -ERANGE;
8157
8158 if (!static_branch_likely(&sched_smt_present))
8159 return -EINVAL;
8160
8161 if (!sched_feat(CORE_PRCTL))
8162 return -ENOSYS;
8163
8164 if (set == 0 && !capable(CAP_SYS_ADMIN))
8165 return -EPERM;
8166
8167 /*
8168 * If cookie was set previously, return -EBUSY if either of the
8169 * following are true:
8170 * 1. Task was previously tagged by CGroup method.
8171 * 2. Task or its parent were tagged by prctl().
8172 *
8173 * Note that, if CGroup tagging is done after prctl(), then that would
8174 * override the cookie. However, if prctl() is done after task was
8175 * added to tagged CGroup, then the prctl() returns -EBUSY.
8176 */
8177 if (!!tsk->core_cookie == set) {
8178 if ((tsk->core_cookie == (unsigned long)tsk)
8179 #ifdef CONFIG_CGROUP_SCHED
8180 || tsk->core_cookie == (unsigned long)tsk->sched_task_group
8181 #endif
8182 ) {
8183 return -EBUSY;
8184 }
8185 }
8186
8187 if (set)
8188 sched_core_get();
8189
8190 if (cookie)
8191 tsk->core_cookie = cookie;
8192 else
8193 tsk->core_cookie = set ? (unsigned long)tsk : 0;
8194
8195 stop_machine(task_set_core_sched_stopper, (void *)tsk, NULL);
8196
8197 if (!set)
8198 sched_core_put();
8199 return 0;
8200 }
8201 #endif
8202
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org