linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rcu:dev.2021.07.27b 33/57] kernel/cpu.c:155:6: error: conflicting types for 'cpu_hp_check_delay'
@ 2021-08-03 19:32 kernel test robot
  2021-08-03 20:31 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-08-03 19:32 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 5003 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.07.27b
head:   11e66439ec35a4e59ab0bafdc33b56f395cc3b49
commit: b2bdd2a98b4b3b955b4f226cea37372ec04874af [33/57] EXP cpu: Add yet more CPU-hotplug progress debugging code
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=b2bdd2a98b4b3b955b4f226cea37372ec04874af
        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 b2bdd2a98b4b3b955b4f226cea37372ec04874af
        # 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@intel.com>

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:155:6: error: conflicting types for 'cpu_hp_check_delay'
     155 | void cpu_hp_check_delay(const char *s, const 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:166:41: warning: integer overflow in expression of type 'long int' results in '1215752192' [-Woverflow]
     166 |  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:166:6: note: in expansion of macro 'WARN_ONCE'
     166 |  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:166:16: note: in expansion of macro 'time_after64'
     166 |  if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, 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_check_delay +155 kernel/cpu.c

   154	
 > 155	void cpu_hp_check_delay(const char *s, const void *func)
   156	{
   157		u64 t, t1;
   158	
   159		if (!smp_load_acquire(&cpu_hp_start_time_valid))
   160			return;
   161		t = READ_ONCE(cpu_hp_start_time);
   162		smp_mb();
   163		if (!READ_ONCE(cpu_hp_start_time_valid))
   164			return;
   165		t1 = ktime_get();
   166		if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, func, (t1 - t) / NSEC_PER_MSEC))
   167			WRITE_ONCE(cpu_hp_start_time, t1);
   168	}
   169	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 68442 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [rcu:dev.2021.07.27b 33/57] kernel/cpu.c:155:6: error: conflicting types for 'cpu_hp_check_delay'
  2021-08-03 19:32 [rcu:dev.2021.07.27b 33/57] kernel/cpu.c:155:6: error: conflicting types for 'cpu_hp_check_delay' kernel test robot
@ 2021-08-03 20:31 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2021-08-03 20:31 UTC (permalink / raw)
  To: kernel test robot; +Cc: kbuild-all, linux-kernel

On Wed, Aug 04, 2021 at 03:32:04AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.07.27b
> head:   11e66439ec35a4e59ab0bafdc33b56f395cc3b49
> commit: b2bdd2a98b4b3b955b4f226cea37372ec04874af [33/57] EXP cpu: Add yet more CPU-hotplug progress debugging code
> 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=b2bdd2a98b4b3b955b4f226cea37372ec04874af
>         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 b2bdd2a98b4b3b955b4f226cea37372ec04874af
>         # 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@intel.com>

This is in experimental code that is not to be mainlined, but may as
well fix it.  Does the patch below do it for you?

							Thanx, Paul

------------------------------------------------------------------------

commit fb843d5528f5b743729424561673203a71dd71de
Author: Paul E. McKenney <paulmck@kernel.org>
Date:   Tue Aug 3 13:29:03 2021 -0700

    EXP cpu: Correctly place cpu_hp_start_now declarations
    
    Reported-by: kernel test robot <lkp@intel.com>
    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 93b9a28ea2bcd..143e5c445068b 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -88,6 +88,7 @@ extern ssize_t arch_cpu_release(const char *, size_t);
 #define CPU_BROKEN		0x000B /* CPU did not die properly */
 
 #ifdef CONFIG_SMP
+extern void cpu_hp_start_now(void);
 extern bool cpuhp_tasks_frozen;
 int add_cpu(unsigned int cpu);
 int cpu_device_up(struct device *dev);
@@ -98,6 +99,7 @@ int bringup_hibernate_cpu(unsigned int sleep_cpu);
 void bringup_nonboot_cpus(unsigned int setup_max_cpus);
 
 #else	/* CONFIG_SMP */
+static inline void cpu_hp_start_now(void) { }
 #define cpuhp_tasks_frozen	0
 
 static inline void cpu_maps_update_begin(void)
@@ -128,7 +130,6 @@ void clear_tasks_mm_cpumask(int cpu);
 int remove_cpu(unsigned int cpu);
 int cpu_device_down(struct device *dev);
 extern void smp_shutdown_nonboot_cpus(unsigned int primary_cpu);
-extern void cpu_hp_start_now(void);
 extern void cpu_hp_stop_now(void);
 extern bool cpu_hp_check_delay(const char *s, const void *func);
 
@@ -144,7 +145,6 @@ static inline void cpu_hotplug_disable(void) { }
 static inline void cpu_hotplug_enable(void) { }
 static inline int remove_cpu(unsigned int cpu) { return -EPERM; }
 static inline void smp_shutdown_nonboot_cpus(unsigned int primary_cpu) { }
-static inline void cpu_hp_start_now(void) { }
 static inline void cpu_hp_stop_now(void) { }
 static inline bool cpu_hp_check_delay(const char *s, void *func) { return false; }
 #endif	/* !CONFIG_HOTPLUG_CPU */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-03 20:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 19:32 [rcu:dev.2021.07.27b 33/57] kernel/cpu.c:155:6: error: conflicting types for 'cpu_hp_check_delay' kernel test robot
2021-08-03 20:31 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).