All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [rcu:dev.2021.08.12a 63/72] kernel/cpu.c:158:6: error: conflicting types for 'cpu_hp_check_delay'; have 'bool(const char *, const void *)' {aka '_Bool(const char *, const void *)'}
Date: Sat, 14 Aug 2021 08:50:38 +0800	[thread overview]
Message-ID: <202108140834.Q4T8R5pI-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.08.12a
head:   3d4b7b3ca5de1d3669890684c3e60d3dad6ea468
commit: 97c274758ba2517477cb43ad2c49af82ea18572d [63/72] EXP cpu: Make cpu_hp_check_delay() return true when detecting an anomaly
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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=97c274758ba2517477cb43ad2c49af82ea18572d
        git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
        git fetch --no-tags rcu dev.2021.08.12a
        git checkout 97c274758ba2517477cb43ad2c49af82ea18572d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

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:137:6: error: redefinition of 'cpu_hp_start_now'
     137 | 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' with type 'void(void)'
     147 | static inline void cpu_hp_start_now(void) { }
         |                    ^~~~~~~~~~~~~~~~
   kernel/cpu.c:146:6: error: redefinition of 'cpu_hp_stop_now'
     146 | 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' with type 'void(void)'
     148 | static inline void cpu_hp_stop_now(void) { }
         |                    ^~~~~~~~~~~~~~~
>> kernel/cpu.c:158:6: error: conflicting types for 'cpu_hp_check_delay'; have 'bool(const char *, const void *)' {aka '_Bool(const char *, const void *)'}
     158 | bool 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' with type 'bool(const char *, void *)' {aka '_Bool(const char *, void *)'}
     149 | static inline bool cpu_hp_check_delay(const char *s, void *func) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~
   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:170:48: warning: integer overflow in expression of type 'long int' results in '1215752192' [-Woverflow]
     170 |         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:41: note: in definition of macro 'DO_ONCE_LITE_IF'
      15 |                 bool __ret_do_once = !!(condition);                     \
         |                                         ^~~~~~~~~
   kernel/cpu.c:170:13: note: in expansion of macro 'WARN_ONCE'
     170 |         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:170:23: note: in expansion of macro 'time_after64'
     170 |         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 +158 kernel/cpu.c

   156	
   157	/* Return true if a time-delay anomaly was detected. */
 > 158	bool cpu_hp_check_delay(const char *s, const void *func)
   159	{
   160		bool ret = false;
   161		u64 t, t1;
   162	
   163		if (!smp_load_acquire(&cpu_hp_start_time_valid))
   164			return false;
   165		t = READ_ONCE(cpu_hp_start_time);
   166		smp_mb();
   167		if (!READ_ONCE(cpu_hp_start_time_valid))
   168			return false;
   169		t1 = ktime_get();
   170		if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, func, (t1 - t) / NSEC_PER_MSEC)) {
   171			WRITE_ONCE(cpu_hp_start_time, t1);
   172			ret = true;
   173		}
   174		if (WARN_ONCE(time_before64(t1, t - 25 * NSEC_PER_MSEC), "%s %ps clock went backwards %llu milliseconds\n", s, func, (t - t1) / NSEC_PER_MSEC)){
   175			WRITE_ONCE(cpu_hp_start_time, t1);
   176			ret = true;
   177		}
   178		return ret;
   179	}
   180	

---
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: 68467 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [rcu:dev.2021.08.12a 63/72] kernel/cpu.c:158:6: error: conflicting types for 'cpu_hp_check_delay'; have 'bool(const char *, const void *)' {aka '_Bool(const char *, const void *)'}
Date: Sat, 14 Aug 2021 08:50:38 +0800	[thread overview]
Message-ID: <202108140834.Q4T8R5pI-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2021.08.12a
head:   3d4b7b3ca5de1d3669890684c3e60d3dad6ea468
commit: 97c274758ba2517477cb43ad2c49af82ea18572d [63/72] EXP cpu: Make cpu_hp_check_delay() return true when detecting an anomaly
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 11.2.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=97c274758ba2517477cb43ad2c49af82ea18572d
        git remote add rcu https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
        git fetch --no-tags rcu dev.2021.08.12a
        git checkout 97c274758ba2517477cb43ad2c49af82ea18572d
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arc 

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:137:6: error: redefinition of 'cpu_hp_start_now'
     137 | 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' with type 'void(void)'
     147 | static inline void cpu_hp_start_now(void) { }
         |                    ^~~~~~~~~~~~~~~~
   kernel/cpu.c:146:6: error: redefinition of 'cpu_hp_stop_now'
     146 | 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' with type 'void(void)'
     148 | static inline void cpu_hp_stop_now(void) { }
         |                    ^~~~~~~~~~~~~~~
>> kernel/cpu.c:158:6: error: conflicting types for 'cpu_hp_check_delay'; have 'bool(const char *, const void *)' {aka '_Bool(const char *, const void *)'}
     158 | bool 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' with type 'bool(const char *, void *)' {aka '_Bool(const char *, void *)'}
     149 | static inline bool cpu_hp_check_delay(const char *s, void *func) { return false; }
         |                    ^~~~~~~~~~~~~~~~~~
   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:170:48: warning: integer overflow in expression of type 'long int' results in '1215752192' [-Woverflow]
     170 |         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:41: note: in definition of macro 'DO_ONCE_LITE_IF'
      15 |                 bool __ret_do_once = !!(condition);                     \
         |                                         ^~~~~~~~~
   kernel/cpu.c:170:13: note: in expansion of macro 'WARN_ONCE'
     170 |         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:170:23: note: in expansion of macro 'time_after64'
     170 |         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 +158 kernel/cpu.c

   156	
   157	/* Return true if a time-delay anomaly was detected. */
 > 158	bool cpu_hp_check_delay(const char *s, const void *func)
   159	{
   160		bool ret = false;
   161		u64 t, t1;
   162	
   163		if (!smp_load_acquire(&cpu_hp_start_time_valid))
   164			return false;
   165		t = READ_ONCE(cpu_hp_start_time);
   166		smp_mb();
   167		if (!READ_ONCE(cpu_hp_start_time_valid))
   168			return false;
   169		t1 = ktime_get();
   170		if (WARN_ONCE(time_after64(t1, t + 100 * NSEC_PER_SEC), "%s %ps took %llu milliseconds\n", s, func, (t1 - t) / NSEC_PER_MSEC)) {
   171			WRITE_ONCE(cpu_hp_start_time, t1);
   172			ret = true;
   173		}
   174		if (WARN_ONCE(time_before64(t1, t - 25 * NSEC_PER_MSEC), "%s %ps clock went backwards %llu milliseconds\n", s, func, (t - t1) / NSEC_PER_MSEC)){
   175			WRITE_ONCE(cpu_hp_start_time, t1);
   176			ret = true;
   177		}
   178		return ret;
   179	}
   180	

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

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

             reply	other threads:[~2021-08-14  0:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14  0:50 kernel test robot [this message]
2021-08-14  0:50 ` [rcu:dev.2021.08.12a 63/72] kernel/cpu.c:158:6: error: conflicting types for 'cpu_hp_check_delay'; have 'bool(const char *, const void *)' {aka '_Bool(const char *, const void *)'} kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108140834.Q4T8R5pI-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.