public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [peterz-queue:perf/wip.cleanup 9/10] arch/x86/events/perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations
@ 2022-05-26 15:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-05-26 15:53 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: llvm, kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/wip.cleanup
head:   012bb7ae4eb84ae93ded12888ccd1e123c64200f
commit: c838cb5fbb27ca829668a88691b07ca63f91fde7 [9/10] perf/x86/intel: Optimize short PEBS counters
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220526/202205262333.thHbJnaz-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6f4644d194da594562027a5d458d9fb7a20ebc39)
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/peterz/queue.git/commit/?id=c838cb5fbb27ca829668a88691b07ca63f91fde7
        git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
        git fetch --no-tags peterz-queue perf/wip.cleanup
        git checkout c838cb5fbb27ca829668a88691b07ca63f91fde7
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/x86/events/core.c:45:
>> arch/x86/events/perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
                         ^
>> arch/x86/events/perf_event.h:1057:13: error: call to undeclared function 'load64_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 left = load64_read(&hwc->period_left);
                      ^
   2 errors generated.
--
   In file included from arch/x86/events/intel/core.c:25:
>> arch/x86/events/intel/../perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
                         ^
>> arch/x86/events/intel/../perf_event.h:1057:13: error: call to undeclared function 'load64_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 left = load64_read(&hwc->period_left);
                      ^
>> arch/x86/events/intel/core.c:2841:26: error: invalid operands to binary expression ('unsigned long[2]' and 'unsigned long long')
           if (!(cpuc->active_mask & (1ULL << hwc->idx)))
                 ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
   3 errors generated.
--
   In file included from arch/x86/events/intel/bts.c:21:
>> arch/x86/events/intel/../perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
                         ^
>> arch/x86/events/intel/../perf_event.h:1057:13: error: call to undeclared function 'load64_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 left = load64_read(&hwc->period_left);
                      ^
   2 errors generated.
--
   In file included from arch/x86/events/intel/pt.c:27:
>> arch/x86/events/intel/../perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
                         ^
>> arch/x86/events/intel/../perf_event.h:1057:13: error: call to undeclared function 'load64_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 left = load64_read(&hwc->period_left);
                      ^
   arch/x86/events/intel/pt.c:719:2: warning: array index -1 is before the beginning of the array [-Warray-bounds]
           TOPA_ENTRY(last, -1)->base = topa_pfn(topa);
           ^                ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:720:2: warning: array index -1 is before the beginning of the array [-Warray-bounds]
           TOPA_ENTRY(last, -1)->end = 1;
           ^                ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:769:2: warning: array index -1 is before the beginning of the array [-Warray-bounds]
           TOPA_ENTRY(topa, -1)->base = page_to_phys(p) >> TOPA_SHIFT;
           ^                ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:770:2: warning: array index -1 is before the beginning of the array [-Warray-bounds]
           TOPA_ENTRY(topa, -1)->size = order;
           ^                ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:773:3: warning: array index -1 is before the beginning of the array [-Warray-bounds]
                   TOPA_ENTRY(topa, -1)->intr = 1;
                   ^                ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:774:3: warning: array index -1 is before the beginning of the array [-Warray-bounds]
                   TOPA_ENTRY(topa, -1)->stop = 1;
                   ^                ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:1235:3: warning: array index -1 is before the beginning of the array [-Warray-bounds]
                   TOPA_ENTRY(buf->last, -1)->base = topa_pfn(buf->first);
                   ^                     ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   arch/x86/events/intel/pt.c:1236:3: warning: array index -1 is before the beginning of the array [-Warray-bounds]
                   TOPA_ENTRY(buf->last, -1)->end = 1;
                   ^                     ~~
   arch/x86/events/intel/pt.c:619:6: note: expanded from macro 'TOPA_ENTRY'
                   : &topa_to_page(t)->table[(i)])
                      ^                       ~
   arch/x86/events/intel/pt.c:596:2: note: array 'table' declared here
           struct topa_entry       table[TENTS_PER_PAGE];
           ^
   8 warnings and 2 errors generated.
--
   In file included from arch/x86/events/zhaoxin/core.c:19:
>> arch/x86/events/zhaoxin/../perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
                         ^
>> arch/x86/events/zhaoxin/../perf_event.h:1057:13: error: call to undeclared function 'load64_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 left = load64_read(&hwc->period_left);
                      ^
   2 errors generated.
--
   In file included from arch/x86/events/amd/core.c:14:
>> arch/x86/events/amd/../perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
                         ^
>> arch/x86/events/amd/../perf_event.h:1057:13: error: call to undeclared function 'load64_read'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           s64 left = load64_read(&hwc->period_left);
                      ^
   2 errors generated.


vim +/this_cpu_load +1056 arch/x86/events/perf_event.h

  1052	
  1053	static inline bool intel_pmu_is_short_pebs(struct perf_event *event)
  1054	{
  1055		struct hw_perf_event *hwc = &event->hw;
> 1056		s64 counter = this_cpu_load(pmc_prev_left[hwc->idx]);
> 1057		s64 left = load64_read(&hwc->period_left);
  1058	
  1059		return counter < left;
  1060	}
  1061	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-26 15:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-26 15:53 [peterz-queue:perf/wip.cleanup 9/10] arch/x86/events/perf_event.h:1056:16: error: call to undeclared function 'this_cpu_load'; ISO C99 and later do not support implicit function declarations kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox