diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-08-29 04:59:39 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-08-29 09:14:38 -0400 |
commit | f52be5708076b75a045ac52c6fef3fffb8300525 (patch) | |
tree | 8e98d8731a45427562e9429a2e763e74828acc27 /include/linux/lockdep.h | |
parent | 7b3d61cc73a1abe4c2c7eaf00093b338c8b233b0 (diff) |
locking/lockdep: Untangle xhlock history save/restore from task independence
Where XHLOCK_{SOFT,HARD} are save/restore points in the xhlocks[] to
ensure the temporal IRQ events don't interact with task state, the
XHLOCK_PROC is a fundament different beast that just happens to share
the interface.
The purpose of XHLOCK_PROC is to annotate independent execution inside
one task. For example workqueues, each work should appear to run in its
own 'pristine' 'task'.
Remove XHLOCK_PROC in favour of its own interface to avoid confusion.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Byungchul Park <byungchul.park@lge.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: boqun.feng@gmail.com
Cc: david@fromorbit.com
Cc: johannes@sipsolutions.net
Cc: kernel-team@lge.com
Cc: oleg@redhat.com
Cc: tj@kernel.org
Link: http://lkml.kernel.org/r/20170829085939.ggmb6xiohw67micb@hirez.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/lockdep.h')
-rw-r--r-- | include/linux/lockdep.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h index 78bb7133abed..bfa8e0b0d6f1 100644 --- a/include/linux/lockdep.h +++ b/include/linux/lockdep.h | |||
@@ -551,7 +551,6 @@ struct pin_cookie { }; | |||
551 | enum xhlock_context_t { | 551 | enum xhlock_context_t { |
552 | XHLOCK_HARD, | 552 | XHLOCK_HARD, |
553 | XHLOCK_SOFT, | 553 | XHLOCK_SOFT, |
554 | XHLOCK_PROC, | ||
555 | XHLOCK_CTX_NR, | 554 | XHLOCK_CTX_NR, |
556 | }; | 555 | }; |
557 | 556 | ||
@@ -580,8 +579,9 @@ extern void lock_commit_crosslock(struct lockdep_map *lock); | |||
580 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ | 579 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ |
581 | { .name = (_name), .key = (void *)(_key), .cross = 0, } | 580 | { .name = (_name), .key = (void *)(_key), .cross = 0, } |
582 | 581 | ||
583 | extern void crossrelease_hist_start(enum xhlock_context_t c, bool force); | 582 | extern void crossrelease_hist_start(enum xhlock_context_t c); |
584 | extern void crossrelease_hist_end(enum xhlock_context_t c); | 583 | extern void crossrelease_hist_end(enum xhlock_context_t c); |
584 | extern void lockdep_invariant_state(bool force); | ||
585 | extern void lockdep_init_task(struct task_struct *task); | 585 | extern void lockdep_init_task(struct task_struct *task); |
586 | extern void lockdep_free_task(struct task_struct *task); | 586 | extern void lockdep_free_task(struct task_struct *task); |
587 | #else /* !CROSSRELEASE */ | 587 | #else /* !CROSSRELEASE */ |
@@ -593,8 +593,9 @@ extern void lockdep_free_task(struct task_struct *task); | |||
593 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ | 593 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ |
594 | { .name = (_name), .key = (void *)(_key), } | 594 | { .name = (_name), .key = (void *)(_key), } |
595 | 595 | ||
596 | static inline void crossrelease_hist_start(enum xhlock_context_t c, bool force) {} | 596 | static inline void crossrelease_hist_start(enum xhlock_context_t c) {} |
597 | static inline void crossrelease_hist_end(enum xhlock_context_t c) {} | 597 | static inline void crossrelease_hist_end(enum xhlock_context_t c) {} |
598 | static inline void lockdep_invariant_state(bool force) {} | ||
598 | static inline void lockdep_init_task(struct task_struct *task) {} | 599 | static inline void lockdep_init_task(struct task_struct *task) {} |
599 | static inline void lockdep_free_task(struct task_struct *task) {} | 600 | static inline void lockdep_free_task(struct task_struct *task) {} |
600 | #endif /* CROSSRELEASE */ | 601 | #endif /* CROSSRELEASE */ |