diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-09 04:45:29 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-10 08:52:14 -0400 |
commit | 040ec23d07f95285e9777a85cda29cb339a3065b (patch) | |
tree | 6069d65b11e8c1db1fe400b09d4f2f1735234ba4 /kernel/sched.c | |
parent | 34078a5e44db3cbed2e0ed580c29a39d94e0cd97 (diff) |
sched: sched_clock() lockdep fix
Sitsofe Wheeler bisected the following commit to cause a lockdep to
warn about itself and turn itself off:
> commit c6531cce6e6e4b99bcda46b6268d6f2d9e30aea4
> Author: Ingo Molnar <mingo@elte.hu>
> Date: Mon May 12 21:21:14 2008 +0200
>
> sched: do not trace sched_clock
do not use raw irq flags in cpu_clock() as it causes lockdep to lose
track of the true state of the IRQ flag.
Reported-and-bisected-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 6590a828138f..b8c9fe676221 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -889,7 +889,7 @@ unsigned long long notrace cpu_clock(int cpu) | |||
889 | unsigned long long prev_cpu_time, time, delta_time; | 889 | unsigned long long prev_cpu_time, time, delta_time; |
890 | unsigned long flags; | 890 | unsigned long flags; |
891 | 891 | ||
892 | raw_local_irq_save(flags); | 892 | local_irq_save(flags); |
893 | prev_cpu_time = per_cpu(prev_cpu_time, cpu); | 893 | prev_cpu_time = per_cpu(prev_cpu_time, cpu); |
894 | time = __cpu_clock(cpu) + per_cpu(time_offset, cpu); | 894 | time = __cpu_clock(cpu) + per_cpu(time_offset, cpu); |
895 | delta_time = time-prev_cpu_time; | 895 | delta_time = time-prev_cpu_time; |
@@ -898,7 +898,7 @@ unsigned long long notrace cpu_clock(int cpu) | |||
898 | time = __sync_cpu_clock(time, cpu); | 898 | time = __sync_cpu_clock(time, cpu); |
899 | per_cpu(prev_cpu_time, cpu) = time; | 899 | per_cpu(prev_cpu_time, cpu) = time; |
900 | } | 900 | } |
901 | raw_local_irq_restore(flags); | 901 | local_irq_restore(flags); |
902 | 902 | ||
903 | return time; | 903 | return time; |
904 | } | 904 | } |