History

lockdep: add might_lock_nested()

Necessary to annotate functions where we might acquire a mutex_lock_nested() or similar. Needed by i915.

Daniel Vetter committed 7 years ago

Commit e692b401 parent f86dbac1 file · +8 −0Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/lockdep.h+8−0
@@ -628,6 +628,13 @@ do { \ · 627 unmodified lines
628 lock_acquire(&(lock)->dep_map, 0, 0, 1, 1, NULL, _THIS_IP_); \628 lock_acquire(&(lock)->dep_map, 0, 0, 1, 1, NULL, _THIS_IP_); \
629 lock_release(&(lock)->dep_map, 0, _THIS_IP_); \629 lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
630} while (0)630} while (0)
631# define might_lock_nested(lock, subclass) \
632do { \
633 typecheck(struct lockdep_map *, &(lock)->dep_map); \
634 lock_acquire(&(lock)->dep_map, subclass, 0, 1, 1, NULL, \
635 _THIS_IP_); \
636 lock_release(&(lock)->dep_map, 0, _THIS_IP_); \
637} while (0)
631 638
632#define lockdep_assert_irqs_enabled() do { \639#define lockdep_assert_irqs_enabled() do { \
633 WARN_ONCE(debug_locks && !current->lockdep_recursion && \640 WARN_ONCE(debug_locks && !current->lockdep_recursion && \
@@ -650,6 +657,7 @@ do { \ · 16 unmodified lines
650#else657#else
651# define might_lock(lock) do { } while (0)658# define might_lock(lock) do { } while (0)
652# define might_lock_read(lock) do { } while (0)659# define might_lock_read(lock) do { } while (0)
660# define might_lock_nested(lock, subclass) do { } while (0)
653# define lockdep_assert_irqs_enabled() do { } while (0)661# define lockdep_assert_irqs_enabled() do { } while (0)
654# define lockdep_assert_irqs_disabled() do { } while (0)662# define lockdep_assert_irqs_disabled() do { } while (0)
655# define lockdep_assert_in_irq() do { } while (0)663# define lockdep_assert_in_irq() do { } while (0)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t