mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
scst: Remove the nolockdep patch files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8664 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
In some cases SCST needs to take multiple locks recursivly, e.g. to lock
|
||||
all tgt_devs in a session. For this case SCST takes those locks in their
|
||||
current sort order, e.g. by LUN for tgt_devs, then releases in the
|
||||
opposite order. Unfortunately, lockdep complains on such actions as
|
||||
recursive locking, then disables itself. The disabling itself action is
|
||||
the most unpleasant one leading to lockdep being useless after this
|
||||
point.
|
||||
|
||||
Unfortunately, nested locking annotations can't help, because after
|
||||
free, then alloc again, or after LUN change (in case of tgt_devs) order
|
||||
of locks can change.
|
||||
|
||||
So, SCST has a set of nolockdep-x.y patches together with "*_nolockdep"
|
||||
locks to implement a way to annotate some lock and unlock actions as "no
|
||||
lockdep", so lockdep will not track them.
|
||||
|
||||
This is a debug aid useful only with lockdep enabled kernels.
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2013-07-23 02:45:53 +0000
|
||||
+++ new/include/linux/lockdep.h 2013-07-23 03:31:57 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2013-07-23 02:45:53 +0000
|
||||
+++ new/include/linux/sched.h 2013-07-23 03:31:57 +0000
|
||||
@@ -1273,6 +1273,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2013-07-23 02:45:53 +0000
|
||||
+++ new/kernel/lockdep.c 2013-07-23 03:31:57 +0000
|
||||
@@ -3593,9 +3593,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3613,6 +3615,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3806,6 +3811,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3826,6 +3834,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2013-07-23 02:45:53 +0000
|
||||
+++ new/kernel/softirq.c 2013-07-23 03:31:57 +0000
|
||||
@@ -314,6 +314,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -368,6 +380,18 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2013-09-28 00:14:38 +0000
|
||||
+++ new/include/linux/lockdep.h 2013-09-28 03:00:19 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2013-09-28 00:14:38 +0000
|
||||
+++ new/include/linux/sched.h 2013-09-28 03:00:19 +0000
|
||||
@@ -1266,6 +1266,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2013-09-28 00:14:38 +0000
|
||||
+++ new/kernel/lockdep.c 2013-09-28 03:00:19 +0000
|
||||
@@ -3593,9 +3593,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3613,6 +3615,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3806,6 +3811,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3826,6 +3834,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2013-09-28 00:14:38 +0000
|
||||
+++ new/kernel/softirq.c 2013-09-28 03:00:19 +0000
|
||||
@@ -312,6 +312,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -366,6 +378,18 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2013-11-30 00:34:22 +0000
|
||||
+++ new/include/linux/lockdep.h 2013-11-30 00:57:33 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2013-11-30 00:34:22 +0000
|
||||
+++ new/include/linux/sched.h 2013-11-30 00:57:33 +0000
|
||||
@@ -1265,6 +1265,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2013-11-30 00:34:22 +0000
|
||||
+++ new/kernel/lockdep.c 2013-11-30 00:57:33 +0000
|
||||
@@ -3593,9 +3593,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3613,6 +3615,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3806,6 +3811,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3826,6 +3834,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2013-11-30 00:34:22 +0000
|
||||
+++ new/kernel/softirq.c 2013-11-30 00:57:33 +0000
|
||||
@@ -312,6 +312,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -375,6 +387,18 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2014-01-30 00:25:53 +0000
|
||||
+++ new/include/linux/lockdep.h 2014-01-30 01:13:44 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2014-01-30 00:25:53 +0000
|
||||
+++ new/include/linux/sched.h 2014-01-30 01:13:44 +0000
|
||||
@@ -1277,6 +1277,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2014-01-30 00:25:53 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2014-01-30 01:13:44 +0000
|
||||
@@ -3593,9 +3593,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3613,6 +3615,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3806,6 +3811,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3826,6 +3834,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2014-01-30 00:25:53 +0000
|
||||
+++ new/kernel/softirq.c 2014-01-30 01:13:44 +0000
|
||||
@@ -313,6 +313,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -382,6 +394,18 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2014-04-17 22:02:06 +0000
|
||||
+++ new/include/linux/lockdep.h 2014-04-17 22:55:34 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2014-04-17 22:02:06 +0000
|
||||
+++ new/include/linux/sched.h 2014-04-17 22:55:34 +0000
|
||||
@@ -1404,6 +1404,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2014-04-17 22:02:06 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2014-04-17 22:55:34 +0000
|
||||
@@ -3595,9 +3595,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3615,6 +3617,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3808,6 +3813,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3828,6 +3836,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2014-04-17 22:02:06 +0000
|
||||
+++ new/kernel/softirq.c 2014-04-17 22:55:34 +0000
|
||||
@@ -321,6 +321,17 @@ asmlinkage void do_softirq(void)
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -389,6 +400,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2014-06-18 01:32:48 +0000
|
||||
+++ new/include/linux/lockdep.h 2014-06-18 01:45:33 +0000
|
||||
@@ -354,7 +354,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2014-06-18 01:32:48 +0000
|
||||
+++ new/include/linux/sched.h 2014-06-18 01:45:33 +0000
|
||||
@@ -1422,6 +1422,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2014-06-18 01:32:48 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2014-06-18 01:45:33 +0000
|
||||
@@ -3592,9 +3592,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3612,6 +3614,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3805,6 +3810,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3825,6 +3833,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2014-06-18 01:32:48 +0000
|
||||
+++ new/kernel/softirq.c 2014-06-18 01:45:33 +0000
|
||||
@@ -322,6 +322,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -390,6 +401,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2014-08-19 01:00:36 +0000
|
||||
+++ new/include/linux/lockdep.h 2014-08-19 01:18:25 +0000
|
||||
@@ -354,7 +354,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2014-08-19 01:00:36 +0000
|
||||
+++ new/include/linux/sched.h 2014-08-19 01:18:25 +0000
|
||||
@@ -1467,6 +1467,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2014-08-19 01:00:36 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2014-08-19 01:18:25 +0000
|
||||
@@ -3592,9 +3592,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3612,6 +3614,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3805,6 +3810,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3825,6 +3833,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2014-08-19 01:00:36 +0000
|
||||
+++ new/kernel/softirq.c 2014-08-19 01:18:25 +0000
|
||||
@@ -320,6 +320,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -388,6 +399,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2014-11-21 03:17:49 +0000
|
||||
+++ new/include/linux/lockdep.h 2014-11-21 03:51:56 +0000
|
||||
@@ -354,7 +354,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2014-11-21 03:17:49 +0000
|
||||
+++ new/include/linux/sched.h 2014-11-21 03:51:56 +0000
|
||||
@@ -1462,6 +1462,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2014-11-21 03:17:49 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2014-11-21 03:51:56 +0000
|
||||
@@ -3594,9 +3594,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3614,6 +3616,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3807,6 +3812,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3827,6 +3835,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2014-11-21 03:17:49 +0000
|
||||
+++ new/kernel/softirq.c 2014-11-21 03:51:56 +0000
|
||||
@@ -320,6 +320,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -388,6 +399,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2012-08-08 02:57:29 +0000
|
||||
+++ new/include/linux/lockdep.h 2012-08-28 21:26:26 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2012-08-08 02:57:29 +0000
|
||||
+++ new/include/linux/sched.h 2012-08-28 22:49:36 +0000
|
||||
@@ -1454,6 +1454,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2012-08-08 02:57:29 +0000
|
||||
+++ new/kernel/lockdep.c 2012-08-28 23:02:47 +0000
|
||||
@@ -3547,9 +3547,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3567,6 +3569,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3760,6 +3765,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3780,6 +3788,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2012-08-08 02:57:29 +0000
|
||||
+++ new/kernel/softirq.c 2012-08-28 23:23:07 +0000
|
||||
@@ -296,6 +296,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -344,6 +356,18 @@ void irq_exit(void)
|
||||
#endif
|
||||
rcu_irq_exit();
|
||||
sched_preempt_enable_no_resched();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2012-10-01 18:39:34 +0000
|
||||
+++ new/include/linux/lockdep.h 2012-10-01 22:12:06 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2012-10-01 18:39:34 +0000
|
||||
+++ new/include/linux/sched.h 2012-10-01 22:12:06 +0000
|
||||
@@ -1462,6 +1462,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2012-10-01 18:39:34 +0000
|
||||
+++ new/kernel/lockdep.c 2012-10-01 22:12:06 +0000
|
||||
@@ -3547,9 +3547,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3567,6 +3569,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3760,6 +3765,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3780,6 +3788,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2012-10-01 18:39:34 +0000
|
||||
+++ new/kernel/softirq.c 2012-10-01 22:12:06 +0000
|
||||
@@ -305,6 +305,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -353,6 +365,18 @@ void irq_exit(void)
|
||||
#endif
|
||||
rcu_irq_exit();
|
||||
sched_preempt_enable_no_resched();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2012-12-17 19:41:04 +0000
|
||||
+++ new/include/linux/lockdep.h 2012-12-17 23:12:00 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2012-12-17 19:41:04 +0000
|
||||
+++ new/include/linux/sched.h 2012-12-17 23:12:00 +0000
|
||||
@@ -1418,6 +1418,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2012-12-17 19:41:04 +0000
|
||||
+++ new/kernel/lockdep.c 2012-12-17 23:12:00 +0000
|
||||
@@ -3586,9 +3586,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3606,6 +3608,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3799,6 +3804,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3819,6 +3827,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2012-12-17 19:41:04 +0000
|
||||
+++ new/kernel/softirq.c 2012-12-17 23:12:00 +0000
|
||||
@@ -306,6 +306,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -354,6 +366,18 @@ void irq_exit(void)
|
||||
#endif
|
||||
rcu_irq_exit();
|
||||
sched_preempt_enable_no_resched();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2013-02-22 21:12:31 +0000
|
||||
+++ new/include/linux/lockdep.h 2013-02-23 00:19:37 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2013-02-22 21:12:31 +0000
|
||||
+++ new/include/linux/sched.h 2013-02-23 00:19:37 +0000
|
||||
@@ -1466,6 +1466,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2013-02-22 21:12:31 +0000
|
||||
+++ new/kernel/lockdep.c 2013-02-23 00:19:37 +0000
|
||||
@@ -3586,9 +3586,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3606,6 +3608,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3799,6 +3804,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3819,6 +3827,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2013-02-22 21:12:31 +0000
|
||||
+++ new/kernel/softirq.c 2013-02-23 00:19:37 +0000
|
||||
@@ -306,6 +306,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -354,6 +366,18 @@ void irq_exit(void)
|
||||
#endif
|
||||
rcu_irq_exit();
|
||||
sched_preempt_enable_no_resched();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2013-05-11 05:39:14 +0000
|
||||
+++ new/include/linux/lockdep.h 2013-05-18 03:43:23 +0000
|
||||
@@ -355,7 +355,7 @@ extern void lockdep_set_current_reclaim_
|
||||
extern void lockdep_clear_current_reclaim_state(void);
|
||||
extern void lockdep_trace_alloc(gfp_t mask);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2013-05-11 05:39:14 +0000
|
||||
+++ new/include/linux/sched.h 2013-05-18 03:43:23 +0000
|
||||
@@ -1438,6 +1438,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/lockdep.c'
|
||||
--- old/kernel/lockdep.c 2013-05-11 05:39:14 +0000
|
||||
+++ new/kernel/lockdep.c 2013-05-18 03:43:23 +0000
|
||||
@@ -3591,9 +3591,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3611,6 +3613,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3804,6 +3809,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3824,6 +3832,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2013-05-11 05:39:14 +0000
|
||||
+++ new/kernel/softirq.c 2013-05-18 03:43:23 +0000
|
||||
@@ -307,6 +307,18 @@ void irq_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -352,6 +364,18 @@ void irq_exit(void)
|
||||
tick_nohz_irq_exit();
|
||||
#endif
|
||||
rcu_irq_exit();
|
||||
+
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2017-05-04 04:27:46 +0000
|
||||
+++ new/include/linux/lockdep.h 2017-05-04 04:39:00 +0000
|
||||
@@ -373,7 +373,7 @@ extern struct pin_cookie lock_pin_lock(s
|
||||
extern void lock_repin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2017-05-04 04:27:46 +0000
|
||||
+++ new/include/linux/sched.h 2017-05-04 04:39:00 +0000
|
||||
@@ -1789,6 +1789,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2017-05-04 04:27:46 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2017-05-04 04:39:00 +0000
|
||||
@@ -3745,9 +3745,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3765,6 +3767,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4013,6 +4018,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4033,6 +4041,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2017-05-04 04:27:46 +0000
|
||||
+++ new/kernel/softirq.c 2017-05-04 04:39:00 +0000
|
||||
@@ -335,6 +335,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -406,6 +417,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2017-06-02 03:24:57 +0000
|
||||
+++ new/include/linux/lockdep.h 2017-06-02 03:31:44 +0000
|
||||
@@ -373,7 +373,7 @@ extern struct pin_cookie lock_pin_lock(s
|
||||
extern void lock_repin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2017-06-02 03:24:57 +0000
|
||||
+++ new/include/linux/sched.h 2017-06-02 03:31:44 +0000
|
||||
@@ -808,6 +808,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2017-06-02 03:24:57 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2017-06-02 03:31:44 +0000
|
||||
@@ -3754,9 +3754,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3774,6 +3776,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4022,6 +4027,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4042,6 +4050,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2017-06-02 03:24:57 +0000
|
||||
+++ new/kernel/softirq.c 2017-06-02 03:31:44 +0000
|
||||
@@ -335,6 +335,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -406,6 +417,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2017-10-03 21:12:19 +0000
|
||||
+++ new/include/linux/lockdep.h 2017-10-03 21:22:27 +0000
|
||||
@@ -375,7 +375,7 @@ extern struct pin_cookie lock_pin_lock(s
|
||||
extern void lock_repin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2017-10-03 21:12:19 +0000
|
||||
+++ new/include/linux/sched.h 2017-10-03 21:22:27 +0000
|
||||
@@ -844,6 +844,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2017-10-03 21:12:19 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2017-10-03 21:22:27 +0000
|
||||
@@ -3847,9 +3847,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3867,6 +3869,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4097,6 +4102,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4117,6 +4125,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2017-10-03 21:12:19 +0000
|
||||
+++ new/kernel/softirq.c 2017-10-03 21:22:27 +0000
|
||||
@@ -335,6 +335,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -406,6 +417,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2016-06-17 23:23:35 +0000
|
||||
+++ new/include/linux/lockdep.h 2016-06-17 23:38:32 +0000
|
||||
@@ -359,7 +359,7 @@ extern void lockdep_trace_alloc(gfp_t ma
|
||||
extern void lock_pin_lock(struct lockdep_map *lock);
|
||||
extern void lock_unpin_lock(struct lockdep_map *lock);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2016-06-17 23:23:35 +0000
|
||||
+++ new/include/linux/sched.h 2016-06-17 23:38:32 +0000
|
||||
@@ -1649,6 +1649,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2016-06-17 23:23:35 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2016-06-17 23:38:32 +0000
|
||||
@@ -3700,9 +3700,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3720,6 +3722,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3948,6 +3953,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -3968,6 +3976,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2016-06-17 23:23:35 +0000
|
||||
+++ new/kernel/softirq.c 2016-06-17 23:38:32 +0000
|
||||
@@ -324,6 +324,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -392,6 +403,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
=== modified file 'include/linux/lockdep.h'
|
||||
--- old/include/linux/lockdep.h 2017-02-02 22:58:27 +0000
|
||||
+++ new/include/linux/lockdep.h 2017-02-02 23:07:50 +0000
|
||||
@@ -364,7 +364,7 @@ extern struct pin_cookie lock_pin_lock(s
|
||||
extern void lock_repin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
extern void lock_unpin_lock(struct lockdep_map *lock, struct pin_cookie);
|
||||
|
||||
-# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0,
|
||||
+# define INIT_LOCKDEP .lockdep_recursion = 0, .lockdep_reclaim_gfp = 0, .nolockdep_call = 0,
|
||||
|
||||
#define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0)
|
||||
|
||||
|
||||
=== modified file 'include/linux/sched.h'
|
||||
--- old/include/linux/sched.h 2017-02-02 22:58:27 +0000
|
||||
+++ new/include/linux/sched.h 2017-02-02 23:07:50 +0000
|
||||
@@ -1746,6 +1746,9 @@ struct task_struct {
|
||||
# define MAX_LOCK_DEPTH 48UL
|
||||
u64 curr_chain_key;
|
||||
int lockdep_depth;
|
||||
+# define NOLOCKDEP_SUPPORTED 1
|
||||
+ unsigned int nolockdep_call:1;
|
||||
+ unsigned int nolockdep_call_irq_saved:1;
|
||||
unsigned int lockdep_recursion;
|
||||
struct held_lock held_locks[MAX_LOCK_DEPTH];
|
||||
gfp_t lockdep_reclaim_gfp;
|
||||
|
||||
=== modified file 'kernel/locking/lockdep.c'
|
||||
--- old/kernel/locking/lockdep.c 2017-02-02 22:58:27 +0000
|
||||
+++ new/kernel/locking/lockdep.c 2017-02-02 23:07:50 +0000
|
||||
@@ -3741,9 +3741,11 @@ void lock_acquire(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
-
|
||||
current->lockdep_recursion = 1;
|
||||
trace_lock_acquire(lock, subclass, trylock, read, check, nest_lock, ip);
|
||||
__lock_acquire(lock, subclass, trylock, read, check,
|
||||
@@ -3761,6 +3763,9 @@ void lock_release(struct lockdep_map *lo
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4009,6 +4014,9 @@ void lock_contended(struct lockdep_map *
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
@@ -4029,6 +4037,9 @@ void lock_acquired(struct lockdep_map *l
|
||||
if (unlikely(current->lockdep_recursion))
|
||||
return;
|
||||
|
||||
+ if (unlikely(current->nolockdep_call))
|
||||
+ return;
|
||||
+
|
||||
raw_local_irq_save(flags);
|
||||
check_flags(flags);
|
||||
current->lockdep_recursion = 1;
|
||||
|
||||
=== modified file 'kernel/softirq.c'
|
||||
--- old/kernel/softirq.c 2017-02-02 22:58:27 +0000
|
||||
+++ new/kernel/softirq.c 2017-02-02 23:07:50 +0000
|
||||
@@ -335,6 +335,17 @@ asmlinkage __visible void do_softirq(voi
|
||||
*/
|
||||
void irq_enter(void)
|
||||
{
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call) {
|
||||
+ current->nolockdep_call_irq_saved = 1;
|
||||
+ current->nolockdep_call = 0;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
rcu_irq_enter();
|
||||
if (is_idle_task(current) && !in_interrupt()) {
|
||||
/*
|
||||
@@ -406,6 +417,17 @@ void irq_exit(void)
|
||||
|
||||
tick_irq_exit();
|
||||
rcu_irq_exit();
|
||||
+#ifdef CONFIG_LOCKDEP
|
||||
+ if (unlikely(current->nolockdep_call_irq_saved)) {
|
||||
+ unsigned long flags;
|
||||
+ local_irq_save(flags);
|
||||
+ if (current->nolockdep_call_irq_saved) {
|
||||
+ current->nolockdep_call_irq_saved = 0;
|
||||
+ current->nolockdep_call = 1;
|
||||
+ }
|
||||
+ local_irq_restore(flags);
|
||||
+ }
|
||||
+#endif
|
||||
trace_hardirq_exit(); /* must be last! */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user