tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 3124fc8676c43f13e7b133644c8a918e7d5dbf0f
commit: d8ad4c3c8c3417d895aeaf05cb11d3b817e813c5 [6/8] sched: avoid scale real weight down
to zero
config: parisc-generic-64bit_defconfig (attached as .config)
compiler: hppa64-linux-gcc (GCC) 9.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d8ad4c3c8c3417d895aeaf05cb11d3b817e813c5
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/core.c:9:
kernel/sched/sched.h: In function 'se_weight':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
kernel/sched/sched.h:125:13: note: each undeclared identifier is reported only once for
each function it appears in
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
--
In file included from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
kernel/sched/sched.h: In function 'se_weight':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
kernel/sched/sched.h:125:13: note: each undeclared identifier is reported only once for
each function it appears in
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
kernel/sched/fair.c: In function '__update_inv_weight':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:209:6: note: in expansion of macro 'scale_load_down'
209 | w = scale_load_down(lw->weight);
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:209:6: note: in expansion of macro 'scale_load_down'
209 | w = scale_load_down(lw->weight);
| ^~~~~~~~~~~~~~~
kernel/sched/fair.c: In function '__calc_delta':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:233:13: note: in expansion of macro 'scale_load_down'
233 | u64 fact = scale_load_down(weight);
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:233:13: note: in expansion of macro 'scale_load_down'
233 | u64 fact = scale_load_down(weight);
| ^~~~~~~~~~~~~~~
In file included from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
kernel/sched/fair.c: In function 'init_entity_runnable_average':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:757:18: note: in expansion of macro 'scale_load_down'
757 | sa->load_avg = scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
--
In file included from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/pelt.c:27:
kernel/sched/sched.h: In function 'se_weight':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
kernel/sched/sched.h:125:13: note: each undeclared identifier is reported only once for
each function it appears in
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/sched.h:727:9: note: in expansion of macro
'scale_load_down'
727 | return scale_load_down(se->load.weight);
| ^~~~~~~~~~~~~~~
In file included from arch/parisc/include/asm/bug.h:5,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/parisc/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/pelt.c:27:
kernel/sched/pelt.c: In function '__update_load_avg_cfs_rq':
kernel/sched/sched.h:125:13: error: 'MIN_SHARES' undeclared (first use in this
function)
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/pelt.c:307:5: note: in expansion of macro
'scale_load_down'
307 | scale_load_down(cfs_rq->load.weight),
| ^~~~~~~~~~~~~~~
include/linux/kernel.h:859:2: error: first argument to '__builtin_choose_expr'
not a constant
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
kernel/sched/sched.h:125:9: note: in expansion of macro 'max'
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/pelt.c:307:5: note: in expansion of macro
'scale_load_down'
307 | scale_load_down(cfs_rq->load.weight),
| ^~~~~~~~~~~~~~~
vim +/scale_load_down +727 kernel/sched/sched.h
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 720
029632fbb7b7c9 kernel/sched.h Peter Zijlstra 2011-10-25 721 #ifdef CONFIG_SMP
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 722 /*
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 723 * XXX we want to get
rid of these helpers and use the full load resolution.
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 724 */
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 725 static inline long
se_weight(struct sched_entity *se)
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 726 {
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 @727 return
scale_load_down(se->load.weight);
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 728 }
c079629862b20c kernel/sched/sched.h Vincent Guittot 2018-06-28 729
:::::: The code at line 727 was first introduced by commit
:::::: c079629862b20c101e8336362a8b042ec7d942fe sched/pelt: Move PELT related code in a
dedicated file
:::::: TO: Vincent Guittot <vincent.guittot(a)linaro.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org