[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202209031847.nxAniAUH-lkp@intel.com>
Date: Sat, 3 Sep 2022 18:30:04 +0800
From: kernel test robot <lkp@...el.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [peterz-queue:perf/core 38/46] include/linux/perf_event.h:643:22:
error: '__lockdep_enabled' undeclared
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git perf/core
head: 9cbc59d1cbddfa6ecbd8fadd3205c8f21703071d
commit: 813fd841611afc9a4aba13e239e33ed0062ec673 [38/46] perf: Add a few assertions
config: arm-randconfig-s053-20220901 (https://download.01.org/0day-ci/archive/20220903/202209031847.nxAniAUH-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.1.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-39-gce1a6720-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=813fd841611afc9a4aba13e239e33ed0062ec673
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue perf/core
git checkout 813fd841611afc9a4aba13e239e33ed0062ec673
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/perf/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from arch/arm/include/asm/bug.h:60,
from include/linux/ktime.h:26,
from include/linux/hrtimer_defs.h:5,
from include/linux/hrtimer.h:15,
from drivers/perf/arm-ccn.c:8:
drivers/perf/arm-ccn.c: In function 'arm_ccn_pmu_event_init':
>> include/linux/perf_event.h:643:22: error: '__lockdep_enabled' undeclared (first use in this function)
643 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:167:32: note: in definition of macro 'WARN_ON'
167 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/perf_event.h:643:9: note: in expansion of macro 'WARN_ON_ONCE'
643 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~
include/linux/perf_event.h:651:9: note: in expansion of macro 'lockdep_assert_event_ctx'
651 | lockdep_assert_event_ctx(event); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/arm-ccn.c:835:9: note: in expansion of macro 'for_each_sibling_event'
835 | for_each_sibling_event(sibling, event->group_leader) {
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/perf_event.h:643:22: note: each undeclared identifier is reported only once for each function it appears in
643 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~~~~~~
include/asm-generic/bug.h:167:32: note: in definition of macro 'WARN_ON'
167 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/perf_event.h:643:9: note: in expansion of macro 'WARN_ON_ONCE'
643 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~
include/linux/perf_event.h:651:9: note: in expansion of macro 'lockdep_assert_event_ctx'
651 | lockdep_assert_event_ctx(event); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/arm-ccn.c:835:9: note: in expansion of macro 'for_each_sibling_event'
835 | for_each_sibling_event(sibling, event->group_leader) {
| ^~~~~~~~~~~~~~~~~~~~~~
>> include/linux/perf_event.h:644:37: error: 'hardirqs_enabled' undeclared (first use in this function)
644 | (this_cpu_read(hardirqs_enabled) || \
| ^~~~~~~~~~~~~~~~
include/asm-generic/bug.h:167:32: note: in definition of macro 'WARN_ON'
167 | int __ret_warn_on = !!(condition); \
| ^~~~~~~~~
include/linux/perf_event.h:643:9: note: in expansion of macro 'WARN_ON_ONCE'
643 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~
include/linux/percpu-defs.h:507:41: note: in expansion of macro '__pcpu_size_call_return'
507 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/perf_event.h:644:23: note: in expansion of macro 'this_cpu_read'
644 | (this_cpu_read(hardirqs_enabled) || \
| ^~~~~~~~~~~~~
include/linux/perf_event.h:651:9: note: in expansion of macro 'lockdep_assert_event_ctx'
651 | lockdep_assert_event_ctx(event); \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/perf/arm-ccn.c:835:9: note: in expansion of macro 'for_each_sibling_event'
835 | for_each_sibling_event(sibling, event->group_leader) {
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/__lockdep_enabled +643 include/linux/perf_event.h
634
635 /*
636 * event->sibling_list is modified whole holding both ctx->lock and ctx->mutex
637 * as such iteration must hold either lock. However, since ctx->lock is an IRQ
638 * safe lock, and is only held by the CPU doing the modification, having IRQs
639 * disabled is sufficient since it will hold-off the IPIs.
640 */
641 #ifdef CONFIG_LOCKDEP
642 #define lockdep_assert_event_ctx(event) \
> 643 WARN_ON_ONCE(__lockdep_enabled && \
> 644 (this_cpu_read(hardirqs_enabled) || \
645 lockdep_is_held(&(event)->ctx->mutex) != LOCK_STATE_HELD))
646 #else
647 #define lockdep_assert_event_ctx(event)
648 #endif
649
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists