Skip to content

Commit

Permalink
lockdep: __always_inline more for noinstr
Browse files Browse the repository at this point in the history
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) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20200603114052.185201076@infradead.org
  • Loading branch information
Peter Zijlstra authored and Thomas Gleixner committed Jun 11, 2020
1 parent 5ef2279 commit 6eebad1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/linux/debug_locks.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern int debug_locks __read_mostly;
extern int debug_locks_silent __read_mostly;


static inline int __debug_locks_off(void)
static __always_inline int __debug_locks_off(void)
{
return xchg(&debug_locks, 0);
}
Expand Down
4 changes: 2 additions & 2 deletions kernel/locking/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ void lockdep_init_task(struct task_struct *task)
task->lockdep_recursion = 0;
}

static inline void lockdep_recursion_finish(void)
static __always_inline void lockdep_recursion_finish(void)
{
if (WARN_ON_ONCE(--current->lockdep_recursion))
current->lockdep_recursion = 0;
Expand Down Expand Up @@ -801,7 +801,7 @@ static int count_matching_names(struct lock_class *new_class)
}

/* used from NMI context -- must be lockless */
static inline struct lock_class *
static __always_inline struct lock_class *
look_up_lock_class(const struct lockdep_map *lock, unsigned int subclass)
{
struct lockdep_subclass_key *key;
Expand Down

0 comments on commit 6eebad1

Please sign in to comment.