]> err.no Git - linux-2.6/commitdiff
[PATCH] lockdep: annotate scheduler runqueue locks
authorIngo Molnar <mingo@elte.hu>
Mon, 3 Jul 2006 07:25:10 +0000 (00:25 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 3 Jul 2006 22:27:07 +0000 (15:27 -0700)
Teach per-CPU runqueue locks and recursive locking code to the lock validator.
 Has no effect on non-lockdep kernels.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c

index ae4db0185bb2dec2f863acda5490a784e6af3a3c..f4778d1aef69dc2b9d1218834adc454f2b155098 100644 (file)
@@ -266,6 +266,7 @@ struct runqueue {
        unsigned long ttwu_cnt;
        unsigned long ttwu_local;
 #endif
+       struct lock_class_key rq_lock_key;
 };
 
 static DEFINE_PER_CPU(struct runqueue, runqueues);
@@ -6656,6 +6657,7 @@ void __init sched_init(void)
 
                rq = cpu_rq(i);
                spin_lock_init(&rq->lock);
+               lockdep_set_class(&rq->lock, &rq->rq_lock_key);
                rq->nr_running = 0;
                rq->active = rq->arrays;
                rq->expired = rq->arrays + 1;