From: kernel test robot <lkp@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [peterz-queue:perf/core 38/46] include/linux/perf_event.h:643:22: error: '__lockdep_enabled' undeclared
Date: Sat, 3 Sep 2022 18:30:04 +0800 [thread overview]
Message-ID: <202209031847.nxAniAUH-lkp@intel.com> (raw)
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@intel.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
reply other threads:[~2022-09-03 10:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202209031847.nxAniAUH-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®