Skip to content

locking/lockdep: Cleaning up lockdep code

Waiman Long lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3locking/lockdep: Make remove_class_from_lock_chains() depend on CONFIG_PROVE_LOCKINGkernel/locking/lockdep.c+4 -20 replies
2/3locking/lockdep: Extract CONFIG_PROVE_LOCKING code out to lockdep_prove.ckernel/locking/lockdep.c kernel/locking/lockdep_prove.c+3025 -30110 replies
3/3locking/lockdep: Consolidate CONFIG_DEBUG_LOCKDEP codekernel/locking/lockdep.c+57 -610 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH-tip 0/3] locking/lockdep: Cleaning up lockdep code

The following conditional compilation macros are used throughout the lockdep code making it hard to understand.
- CONFIG_PROVE_LOCKING
- CONFIG_LOCK_STAT
- CONFIG_DEBUG_LOCKDEP
- CONFIG_LOCKDEP_SMALL
- CONFIG_TRACE_IRQFLAGS

In particular, almost half of the code is for CONFIG_PROVE_LOCKING and there are several blocks of them in lockdep.c. It is very hard to see if a function is for CONFIG_PROVE_LOCKING or not.

This patchset cleans up this mess by putting all the CONFIG_PROVE_LOCKING functions into a separate lockdep_prove.c file making it easier to know what they are for. It also consolidates the CONFIG_DEBUG_LOCKDEP code to a certain extend.

This is a code relocation patchset. There is no functional change.

Waiman Long (3):
locking/lockdep: Make remove_class_from_lock_chains() depend on
CONFIG_PROVE_LOCKING
locking/lockdep: Extract CONFIG_PROVE_LOCKING code out to
lockdep_prove.c
locking/lockdep: Consolidate CONFIG_DEBUG_LOCKDEP code

 kernel/locking/lockdep.c       | 3300 +++-----------------------------
 kernel/locking/lockdep_prove.c | 2820 +++++++++++++++++++++++++++
 2 files changed, 3066 insertions(+), 3054 deletions(-)
 create mode 100644 kernel/locking/lockdep_prove.c
Signature · 1 line
2.18.1