[rcu:dev.2021.07.27b 32/57] kernel/cpu.c:135:6: error: redefinition of 'cpu_hp_start_now'

From: kernel test robot
Date: Tue Aug 03 2021 - 11:22:52 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.07.27b
head: 11e66439ec35a4e59ab0bafdc33b56f395cc3b49
commit: fe900dbb9ac6756870dd5241bdcdd44770f23a93 [32/57] EXP cpu: CPU-hotplug progress checks
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 10.3.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://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=fe900dbb9ac6756870dd5241bdcdd44770f23a93
git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git fetch --no-tags rcu dev.2021.07.27b
git checkout fe900dbb9ac6756870dd5241bdcdd44770f23a93
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> kernel/cpu.c:135:6: error: redefinition of 'cpu_hp_start_now'
135 | void cpu_hp_start_now(void)
| ^~~~~~~~~~~~~~~~
In file included from kernel/cpu.c:17:
include/linux/cpu.h:147:20: note: previous definition of 'cpu_hp_start_now' was here
147 | static inline void cpu_hp_start_now(void) { }
| ^~~~~~~~~~~~~~~~
>> kernel/cpu.c:144:6: error: redefinition of 'cpu_hp_stop_now'
144 | void cpu_hp_stop_now(void)
| ^~~~~~~~~~~~~~~
In file included from kernel/cpu.c:17:
include/linux/cpu.h:148:20: note: previous definition of 'cpu_hp_stop_now' was here
148 | static inline void cpu_hp_stop_now(void) { }
| ^~~~~~~~~~~~~~~
kernel/cpu.c:150:6: error: redefinition of 'cpu_hp_check_delay'
150 | void cpu_hp_check_delay(const char *s, void *func)
| ^~~~~~~~~~~~~~~~~~
In file included from kernel/cpu.c:17:
include/linux/cpu.h:149:20: note: previous definition of 'cpu_hp_check_delay' was here
149 | static inline void cpu_hp_check_delay(const char *s, void *func) { }
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:11,
from include/linux/kernel.h:19,
from include/linux/sched/mm.h:5,
from kernel/cpu.c:6:
kernel/cpu.c: In function 'cpu_hp_check_delay':
kernel/cpu.c:161:41: warning: integer overflow in expression of type 'long int' results in '1215752192' [-Woverflow]
161 | if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, func, (t1 - t) / NSEC_PER_MSEC))
| ^
include/linux/once_lite.h:15:27: note: in definition of macro 'DO_ONCE_LITE_IF'
15 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
kernel/cpu.c:161:6: note: in expansion of macro 'WARN_ONCE'
161 | if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, func, (t1 - t) / NSEC_PER_MSEC))
| ^~~~~~~~~
kernel/cpu.c:161:16: note: in expansion of macro 'time_after64'
161 | if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, func, (t1 - t) / NSEC_PER_MSEC))
| ^~~~~~~~~~~~
kernel/cpu.c: In function 'cpuhp_up_callbacks':
kernel/cpu.c:731:37: warning: integer overflow in expression of type 'long int' results in '1215752192' [-Woverflow]
731 | WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "CPU-hotplug notifier %s took %llu milliseconds\n", __func__, (t1 - t) / NSEC_PER_MSEC);
| ^
include/linux/once_lite.h:15:27: note: in definition of macro 'DO_ONCE_LITE_IF'
15 | bool __ret_do_once = !!(condition); \
| ^~~~~~~~~
kernel/cpu.c:731:2: note: in expansion of macro 'WARN_ONCE'
731 | WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "CPU-hotplug notifier %s took %llu milliseconds\n", __func__, (t1 - t) / NSEC_PER_MSEC);
| ^~~~~~~~~
kernel/cpu.c:731:12: note: in expansion of macro 'time_after64'
731 | WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "CPU-hotplug notifier %s took %llu milliseconds\n", __func__, (t1 - t) / NSEC_PER_MSEC);
| ^~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/events/power.h:12,
from kernel/cpu.c:37:
At top level:
arch/arc/include/asm/perf_event.h:126:23: warning: 'arc_pmu_cache_map' defined but not used [-Wunused-const-variable=]
126 | static const unsigned arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: warning: 'arc_pmu_ev_hw_map' defined but not used [-Wunused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~


vim +/cpu_hp_start_now +135 kernel/cpu.c

134
> 135 void cpu_hp_start_now(void)
136 {
137 // if (jiffies < 9 * HZ)
138 // return;
139 // WARN_ON_ONCE(cpu_hp_start_time_valid);
140 WRITE_ONCE(cpu_hp_start_time, ktime_get_mono_fast_ns());
141 smp_store_release(&cpu_hp_start_time_valid, true);
142 }
143
> 144 void cpu_hp_stop_now(void)
145 {
146 // WARN_ON_ONCE(!cpu_hp_start_time_valid && jiffies > 10 * HZ);
147 smp_store_release(&cpu_hp_start_time_valid, false);
148 }
149

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip