Skip to content

Commit 6eebad1

Browse files
Peter ZijlstraKAGA-KOKO
authored andcommitted
lockdep: __always_inline more for noinstr
vmlinux.o: warning: objtool: debug_locks_off()+0xd: call to __debug_locks_off() leaves .noinstr.text section vmlinux.o: warning: objtool: match_held_lock()+0x6a: call to look_up_lock_class.isra.0() leaves .noinstr.text section vmlinux.o: warning: objtool: lock_is_held_type()+0x90: call to lockdep_recursion_finish() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 5ef2279 commit 6eebad1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/linux/debug_locks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern int debug_locks __read_mostly;
1212
extern int debug_locks_silent __read_mostly;
1313

1414

15-
static inline int __debug_locks_off(void)
15+
static __always_inline int __debug_locks_off(void)
1616
{
1717
return xchg(&debug_locks, 0);
1818
}

kernel/locking/lockdep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void lockdep_init_task(struct task_struct *task)
393393
task->lockdep_recursion = 0;
394394
}
395395

396-
static inline void lockdep_recursion_finish(void)
396+
static __always_inline void lockdep_recursion_finish(void)
397397
{
398398
if (WARN_ON_ONCE(--current->lockdep_recursion))
399399
current->lockdep_recursion = 0;
@@ -801,7 +801,7 @@ static int count_matching_names(struct lock_class *new_class)
801801
}
802802

803803
/* used from NMI context -- must be lockless */
804-
static inline struct lock_class *
804+
static __always_inline struct lock_class *
805805
look_up_lock_class(const struct lockdep_map *lock, unsigned int subclass)
806806
{
807807
struct lockdep_subclass_key *key;

0 commit comments

Comments
 (0)