Hi Prasad,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/timers/core]
[also build test WARNING on tip/auto-latest tip/timers/nohz v5.6-rc6 next-20200316]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see
https://stackoverflow.com/a/37406982]
url:
https://github.com/0day-ci/linux/commits/Prasad-Sodagudi/timer-make-defer...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
d441dceb5dce71150f28add80d36d91bbfccba99
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
kernel/time/timer.c: In function 'get_timer_cpu_base':
kernel/time/timer.c:848:11: error: 'timer_base_deferrable' undeclared (first
use in this function)
848 | base = &timer_base_deferrable;
| ^~~~~~~~~~~~~~~~~~~~~
kernel/time/timer.c:848:11: note: each undeclared identifier is reported only once for
each function it appears in
kernel/time/timer.c: In function 'get_timer_this_cpu_base':
kernel/time/timer.c:867:11: error: 'timer_base_deferrable' undeclared (first
use in this function)
867 | base = &timer_base_deferrable;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/uapi/asm/intrinsics.h:22,
from arch/ia64/include/asm/intrinsics.h:11,
from arch/ia64/include/asm/bitops.h:19,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/smp.h:12,
from include/linux/kernel_stat.h:5,
from kernel/time/timer.c:21:
kernel/time/timer.c: In function 'run_timer_softirq':
kernel/time/timer.c:1828:24: error: 'deferrable_pending' undeclared (first use
in this function)
1828 | if ((atomic_cmpxchg(&deferrable_pending, 1, 0) &&
| ^~~~~~~~~~~~~~~~~~
arch/ia64/include/uapi/asm/cmpxchg.h:75:10: note: in definition of macro
'ia64_cmpxchg'
75 | switch (size) { \
| ^~~~
> arch/ia64/include/uapi/asm/cmpxchg.h:130:28: note: in expansion
of macro 'cmpxchg_acq'
130 | #define cmpxchg(ptr, o, n)
cmpxchg_acq((ptr), (o), (n))
| ^~~~~~~~~~~
> arch/ia64/include/asm/atomic.h:211:38: note: in expansion of
macro 'cmpxchg'
211 | #define atomic_cmpxchg(v, old, new)
(cmpxchg(&((v)->counter), old, new))
| ^~~~~~~
kernel/time/timer.c:1828:8: note: in expansion of macro 'atomic_cmpxchg'
1828 | if ((atomic_cmpxchg(&deferrable_pending, 1, 0) &&
| ^~~~~~~~~~~~~~
kernel/time/timer.c:1829:5: error: 'tick_do_timer_cpu' undeclared (first use in
this function); did you mean 'tick_dep_clear_cpu'?
1829 | tick_do_timer_cpu == TICK_DO_TIMER_NONE) ||
| ^~~~~~~~~~~~~~~~~
| tick_dep_clear_cpu
kernel/time/timer.c:1829:26: error: 'TICK_DO_TIMER_NONE' undeclared (first use
in this function)
1829 | tick_do_timer_cpu == TICK_DO_TIMER_NONE) ||
| ^~~~~~~~~~~~~~~~~~
kernel/time/timer.c:1831:18: error: 'timer_base_deferrable' undeclared (first
use in this function)
1831 | __run_timers(&timer_base_deferrable);
| ^~~~~~~~~~~~~~~~~~~~~
kernel/time/timer.c: In function 'init_timer_deferrable_global':
kernel/time/timer.c:2073:2: error: 'timer_base_deferrable' undeclared (first
use in this function)
2073 | timer_base_deferrable.cpu = nr_cpu_ids;
| ^~~~~~~~~~~~~~~~~~~~~
--
kernel//time/timer.c: In function 'get_timer_cpu_base':
kernel//time/timer.c:848:11: error: 'timer_base_deferrable' undeclared (first
use in this function)
848 | base = &timer_base_deferrable;
| ^~~~~~~~~~~~~~~~~~~~~
kernel//time/timer.c:848:11: note: each undeclared identifier is reported only once for
each function it appears in
kernel//time/timer.c: In function 'get_timer_this_cpu_base':
kernel//time/timer.c:867:11: error: 'timer_base_deferrable' undeclared (first
use in this function)
867 | base = &timer_base_deferrable;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/uapi/asm/intrinsics.h:22,
from arch/ia64/include/asm/intrinsics.h:11,
from arch/ia64/include/asm/bitops.h:19,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/smp.h:12,
from include/linux/kernel_stat.h:5,
from kernel//time/timer.c:21:
kernel//time/timer.c: In function 'run_timer_softirq':
kernel//time/timer.c:1828:24: error: 'deferrable_pending' undeclared (first use
in this function)
1828 | if ((atomic_cmpxchg(&deferrable_pending, 1, 0) &&
| ^~~~~~~~~~~~~~~~~~
arch/ia64/include/uapi/asm/cmpxchg.h:75:10: note: in definition of macro
'ia64_cmpxchg'
75 | switch (size) { \
| ^~~~
> arch/ia64/include/uapi/asm/cmpxchg.h:130:28: note: in expansion
of macro 'cmpxchg_acq'
130 | #define cmpxchg(ptr, o, n)
cmpxchg_acq((ptr), (o), (n))
| ^~~~~~~~~~~
> arch/ia64/include/asm/atomic.h:211:38: note: in expansion of
macro 'cmpxchg'
211 | #define atomic_cmpxchg(v, old, new)
(cmpxchg(&((v)->counter), old, new))
| ^~~~~~~
kernel//time/timer.c:1828:8: note: in expansion of macro 'atomic_cmpxchg'
1828 | if ((atomic_cmpxchg(&deferrable_pending, 1, 0) &&
| ^~~~~~~~~~~~~~
kernel//time/timer.c:1829:5: error: 'tick_do_timer_cpu' undeclared (first use
in this function); did you mean 'tick_dep_clear_cpu'?
1829 | tick_do_timer_cpu == TICK_DO_TIMER_NONE) ||
| ^~~~~~~~~~~~~~~~~
| tick_dep_clear_cpu
kernel//time/timer.c:1829:26: error: 'TICK_DO_TIMER_NONE' undeclared (first use
in this function)
1829 | tick_do_timer_cpu == TICK_DO_TIMER_NONE) ||
| ^~~~~~~~~~~~~~~~~~
kernel//time/timer.c:1831:18: error: 'timer_base_deferrable' undeclared (first
use in this function)
1831 | __run_timers(&timer_base_deferrable);
| ^~~~~~~~~~~~~~~~~~~~~
kernel//time/timer.c: In function 'init_timer_deferrable_global':
kernel//time/timer.c:2073:2: error: 'timer_base_deferrable' undeclared (first
use in this function)
2073 | timer_base_deferrable.cpu = nr_cpu_ids;
| ^~~~~~~~~~~~~~~~~~~~~
vim +/cmpxchg_acq +130 arch/ia64/include/uapi/asm/cmpxchg.h
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 114
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 115
#define cmpxchg_acq(ptr, o, n) \
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 116
ia64_cmpxchg(acq, (ptr), (o), (n), sizeof(*(ptr)))
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 117
#define cmpxchg_rel(ptr, o, n) \
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 118
ia64_cmpxchg(rel, (ptr), (o), (n), sizeof(*(ptr)))
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 119
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 120 /*
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 121 *
Worse still - early processor implementations actually just ignored
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 122 * the
acquire/release and did a full fence all the time. Unfortunately
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 123 *
this meant a lot of badly written code that used .acq when they really
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 124 *
wanted .rel became legacy out in the wild - so when we made a cpu
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 125 *
that strictly did the .acq or .rel ... all that code started breaking - so
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 126 * we
had to back-pedal and keep the "legacy" behavior of a full fence :-(
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 127 */
e4f9bfb3feaeac arch/ia64/include/uapi/asm/cmpxchg.h Peter Zijlstra 2014-02-04 128
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 129 /* for
compatibility with other platforms: */
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 @130
#define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n))
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 131
#define cmpxchg64(ptr, o, n) cmpxchg_acq((ptr), (o), (n))
85f8f7759e418c arch/ia64/include/asm/cmpxchg.h Paul Gortmaker 2012-04-03 132
:::::: The code at line 130 was first introduced by commit
:::::: 85f8f7759e418c814ee2ceacf73eddb9bed39492 ia64: populate the cmpxchg header with
appropriate code
:::::: TO: Paul Gortmaker <paul.gortmaker(a)windriver.com>
:::::: CC: Paul Gortmaker <paul.gortmaker(a)windriver.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org