From: kernel test robot <lkp@intel.com>
To: elver@google.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [melver:cap-analysis/dev 18/26] include/linux/local_lock_internal.h:111:17: error: implicit declaration of function 'local_irq_enable'
Date: Fri, 14 Feb 2025 20:36:23 +0800 [thread overview]
Message-ID: <202502142000.elXvNztG-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git cap-analysis/dev
head: 9c8d14ce8aff2d38bf494f5d5436a302e3236842
commit: 895e91e6a76fc478ef13428a02587e5a424fc0be [18/26] locking/local_lock: Support Clang's capability analysis
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20250214/202502142000.elXvNztG-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250214/202502142000.elXvNztG-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502142000.elXvNztG-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/jump_label.h:78,
from include/linux/dynamic_debug.h:6,
from include/linux/printk.h:610,
from include/linux/kernel.h:31,
from include/linux/bit_spinlock.h:5,
from lib/test_capability-analysis.c:7:
include/linux/local_lock.h: In function 'class_local_lock_irq_destructor':
>> include/linux/local_lock_internal.h:111:17: error: implicit declaration of function 'local_irq_enable' [-Wimplicit-function-declaration]
111 | local_irq_enable(); \
| ^~~~~~~~~~~~~~~~
include/linux/cleanup.h:379:25: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
379 | if (_T->lock) { _unlock; } \
| ^~~~~~~
include/linux/local_lock.h:57:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1'
57 | DEFINE_LOCK_GUARD_1(local_lock_irq, local_lock_t __percpu,
| ^~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:43:41: note: in expansion of macro '__local_unlock_irq'
43 | #define local_unlock_irq(lock) __local_unlock_irq(lock)
| ^~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:59:21: note: in expansion of macro 'local_unlock_irq'
59 | local_unlock_irq(_T->lock))
| ^~~~~~~~~~~~~~~~
include/linux/local_lock.h: In function 'class_local_lock_irq_constructor':
>> include/linux/local_lock_internal.h:88:17: error: implicit declaration of function 'local_irq_disable' [-Wimplicit-function-declaration]
88 | local_irq_disable(); \
| ^~~~~~~~~~~~~~~~~
include/linux/cleanup.h:393:9: note: in definition of macro '__DEFINE_LOCK_GUARD_1'
393 | _lock; \
| ^~~~~
include/linux/local_lock.h:57:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1'
57 | DEFINE_LOCK_GUARD_1(local_lock_irq, local_lock_t __percpu,
| ^~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:22:41: note: in expansion of macro '__local_lock_irq'
22 | #define local_lock_irq(lock) __local_lock_irq(lock)
| ^~~~~~~~~~~~~~~~
include/linux/local_lock.h:58:21: note: in expansion of macro 'local_lock_irq'
58 | local_lock_irq(_T->lock),
| ^~~~~~~~~~~~~~
include/linux/local_lock.h: In function 'class_local_lock_irqsave_destructor':
>> include/linux/local_lock_internal.h:118:17: error: implicit declaration of function 'local_irq_restore' [-Wimplicit-function-declaration]
118 | local_irq_restore(flags); \
| ^~~~~~~~~~~~~~~~~
include/linux/cleanup.h:379:25: note: in definition of macro '__DEFINE_UNLOCK_GUARD'
379 | if (_T->lock) { _unlock; } \
| ^~~~~~~
include/linux/local_lock.h:60:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1'
60 | DEFINE_LOCK_GUARD_1(local_lock_irqsave, local_lock_t __percpu,
| ^~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:52:9: note: in expansion of macro '__local_unlock_irqrestore'
52 | __local_unlock_irqrestore(lock, flags)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:62:21: note: in expansion of macro 'local_unlock_irqrestore'
62 | local_unlock_irqrestore(_T->lock, _T->flags),
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h: In function 'class_local_lock_irqsave_constructor':
>> include/linux/local_lock_internal.h:95:17: error: implicit declaration of function 'local_irq_save' [-Wimplicit-function-declaration]
95 | local_irq_save(flags); \
| ^~~~~~~~~~~~~~
include/linux/cleanup.h:393:9: note: in definition of macro '__DEFINE_LOCK_GUARD_1'
393 | _lock; \
| ^~~~~
include/linux/local_lock.h:60:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1'
60 | DEFINE_LOCK_GUARD_1(local_lock_irqsave, local_lock_t __percpu,
| ^~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:31:9: note: in expansion of macro '__local_lock_irqsave'
31 | __local_lock_irqsave(lock, flags)
| ^~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:61:21: note: in expansion of macro 'local_lock_irqsave'
61 | local_lock_irqsave(_T->lock, _T->flags),
| ^~~~~~~~~~~~~~~~~~
include/linux/local_lock.h: In function 'class_local_lock_nested_bh_constructor':
include/asm-generic/percpu.h:136:9: error: implicit declaration of function 'raw_local_irq_save' [-Wimplicit-function-declaration]
136 | raw_local_irq_save(___flags); \
| ^~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:393:9: note: in definition of macro '__DEFINE_LOCK_GUARD_1'
393 | _lock; \
| ^~~~~
include/linux/local_lock.h:71:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1'
71 | DEFINE_LOCK_GUARD_1(local_lock_nested_bh, local_lock_t __percpu,
| ^~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:618:9: note: in expansion of macro 'WARN_ON_ONCE'
618 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~
include/asm-generic/percpu.h:148:25: note: in expansion of macro '__this_cpu_generic_read_noirq'
148 | __ret = __this_cpu_generic_read_noirq(pcp); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:375:41: note: in expansion of macro 'this_cpu_generic_read'
375 | #define this_cpu_read_1(pcp) this_cpu_generic_read(pcp)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:323:30: note: in expansion of macro 'this_cpu_read_1'
323 | case 1: pscr_ret__ = stem##1(variable); break; \
| ^~~~
include/linux/percpu-defs.h:497:41: note: in expansion of macro '__pcpu_size_call_return'
497 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:573:50: note: in expansion of macro 'this_cpu_read'
573 | #define __lockdep_enabled (debug_locks && !this_cpu_read(lockdep_recursion))
| ^~~~~~~~~~~~~
include/linux/lockdep.h:618:22: note: in expansion of macro '__lockdep_enabled'
618 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~~~~~~
include/linux/local_lock_internal.h:123:17: note: in expansion of macro 'lockdep_assert_in_softirq'
123 | lockdep_assert_in_softirq(); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:66:9: note: in expansion of macro '__local_lock_nested_bh'
66 | __local_lock_nested_bh(_lock)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:72:21: note: in expansion of macro 'local_lock_nested_bh'
72 | local_lock_nested_bh(_T->lock),
| ^~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:138:9: error: implicit declaration of function 'raw_local_irq_restore' [-Wimplicit-function-declaration]
138 | raw_local_irq_restore(___flags); \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/cleanup.h:393:9: note: in definition of macro '__DEFINE_LOCK_GUARD_1'
393 | _lock; \
| ^~~~~
include/linux/local_lock.h:71:1: note: in expansion of macro 'DEFINE_LOCK_GUARD_1'
71 | DEFINE_LOCK_GUARD_1(local_lock_nested_bh, local_lock_t __percpu,
| ^~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:618:9: note: in expansion of macro 'WARN_ON_ONCE'
618 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~
include/asm-generic/percpu.h:148:25: note: in expansion of macro '__this_cpu_generic_read_noirq'
148 | __ret = __this_cpu_generic_read_noirq(pcp); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/percpu.h:375:41: note: in expansion of macro 'this_cpu_generic_read'
375 | #define this_cpu_read_1(pcp) this_cpu_generic_read(pcp)
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:323:30: note: in expansion of macro 'this_cpu_read_1'
323 | case 1: pscr_ret__ = stem##1(variable); break; \
| ^~~~
include/linux/percpu-defs.h:497:41: note: in expansion of macro '__pcpu_size_call_return'
497 | #define this_cpu_read(pcp) __pcpu_size_call_return(this_cpu_read_, pcp)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/lockdep.h:573:50: note: in expansion of macro 'this_cpu_read'
573 | #define __lockdep_enabled (debug_locks && !this_cpu_read(lockdep_recursion))
| ^~~~~~~~~~~~~
include/linux/lockdep.h:618:22: note: in expansion of macro '__lockdep_enabled'
618 | WARN_ON_ONCE(__lockdep_enabled && \
| ^~~~~~~~~~~~~~~~~
include/linux/local_lock_internal.h:123:17: note: in expansion of macro 'lockdep_assert_in_softirq'
123 | lockdep_assert_in_softirq(); \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:66:9: note: in expansion of macro '__local_lock_nested_bh'
66 | __local_lock_nested_bh(_lock)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/local_lock.h:72:21: note: in expansion of macro 'local_lock_nested_bh'
72 | local_lock_nested_bh(_T->lock),
| ^~~~~~~~~~~~~~~~~~~~
vim +/local_irq_enable +111 include/linux/local_lock_internal.h
c5bcab7558220bb Sebastian Andrzej Siewior 2024-06-20 78
91710728d1725de Thomas Gleixner 2020-05-27 79 #define __local_lock(lock) \
91710728d1725de Thomas Gleixner 2020-05-27 80 do { \
91710728d1725de Thomas Gleixner 2020-05-27 81 preempt_disable(); \
91710728d1725de Thomas Gleixner 2020-05-27 82 local_lock_acquire(this_cpu_ptr(lock)); \
895e91e6a76fc47 Marco Elver 2025-01-30 83 __acquire(lock); \
91710728d1725de Thomas Gleixner 2020-05-27 84 } while (0)
91710728d1725de Thomas Gleixner 2020-05-27 85
91710728d1725de Thomas Gleixner 2020-05-27 86 #define __local_lock_irq(lock) \
91710728d1725de Thomas Gleixner 2020-05-27 87 do { \
91710728d1725de Thomas Gleixner 2020-05-27 @88 local_irq_disable(); \
91710728d1725de Thomas Gleixner 2020-05-27 89 local_lock_acquire(this_cpu_ptr(lock)); \
895e91e6a76fc47 Marco Elver 2025-01-30 90 __acquire(lock); \
91710728d1725de Thomas Gleixner 2020-05-27 91 } while (0)
91710728d1725de Thomas Gleixner 2020-05-27 92
91710728d1725de Thomas Gleixner 2020-05-27 93 #define __local_lock_irqsave(lock, flags) \
91710728d1725de Thomas Gleixner 2020-05-27 94 do { \
91710728d1725de Thomas Gleixner 2020-05-27 @95 local_irq_save(flags); \
91710728d1725de Thomas Gleixner 2020-05-27 96 local_lock_acquire(this_cpu_ptr(lock)); \
895e91e6a76fc47 Marco Elver 2025-01-30 97 __acquire(lock); \
91710728d1725de Thomas Gleixner 2020-05-27 98 } while (0)
91710728d1725de Thomas Gleixner 2020-05-27 99
91710728d1725de Thomas Gleixner 2020-05-27 100 #define __local_unlock(lock) \
91710728d1725de Thomas Gleixner 2020-05-27 101 do { \
895e91e6a76fc47 Marco Elver 2025-01-30 102 __release(lock); \
91710728d1725de Thomas Gleixner 2020-05-27 103 local_lock_release(this_cpu_ptr(lock)); \
91710728d1725de Thomas Gleixner 2020-05-27 104 preempt_enable(); \
91710728d1725de Thomas Gleixner 2020-05-27 105 } while (0)
91710728d1725de Thomas Gleixner 2020-05-27 106
91710728d1725de Thomas Gleixner 2020-05-27 107 #define __local_unlock_irq(lock) \
91710728d1725de Thomas Gleixner 2020-05-27 108 do { \
895e91e6a76fc47 Marco Elver 2025-01-30 109 __release(lock); \
91710728d1725de Thomas Gleixner 2020-05-27 110 local_lock_release(this_cpu_ptr(lock)); \
91710728d1725de Thomas Gleixner 2020-05-27 @111 local_irq_enable(); \
91710728d1725de Thomas Gleixner 2020-05-27 112 } while (0)
91710728d1725de Thomas Gleixner 2020-05-27 113
91710728d1725de Thomas Gleixner 2020-05-27 114 #define __local_unlock_irqrestore(lock, flags) \
91710728d1725de Thomas Gleixner 2020-05-27 115 do { \
895e91e6a76fc47 Marco Elver 2025-01-30 116 __release(lock); \
91710728d1725de Thomas Gleixner 2020-05-27 117 local_lock_release(this_cpu_ptr(lock)); \
91710728d1725de Thomas Gleixner 2020-05-27 @118 local_irq_restore(flags); \
91710728d1725de Thomas Gleixner 2020-05-27 119 } while (0)
026659b9774e4c5 Thomas Gleixner 2021-08-15 120
:::::: The code at line 111 was first introduced by commit
:::::: 91710728d1725de51d06b40674abf6e860d592c7 locking: Introduce local_lock()
:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Ingo Molnar <mingo@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-02-14 12:37 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=202502142000.elXvNztG-lkp@intel.com \
--to=lkp@intel.com \
--cc=elver@google.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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.