aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-29 09:01:59 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-29 09:05:00 -0400
commit2d452c9b10caeec455eb5e56a0ef4ed485178213 (patch)
tree8c7af10fa4b2f69307a1b4e0a997ed9d4e2ed32d
parent4c9fe8ad813b257a2b9ddf0f752105a75a7dae63 (diff)
sched: sched_clock_cpu() based cpu_clock(), lockdep fix
Vegard Nossum reported: > WARNING: at kernel/lockdep.c:2738 check_flags+0x142/0x160() which happens due to: unsigned long long cpu_clock(int cpu) { unsigned long long clock; unsigned long flags; raw_local_irq_save(flags); as lower level functions can take locks, we must not do that, use proper lockdep-annotated irq save/restore. Reported-by: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/sched_clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched_clock.c b/kernel/sched_clock.c
index ed5a8c415046..60094e257a9a 100644
--- a/kernel/sched_clock.c
+++ b/kernel/sched_clock.c
@@ -250,9 +250,9 @@ unsigned long long cpu_clock(int cpu)
250 unsigned long long clock; 250 unsigned long long clock;
251 unsigned long flags; 251 unsigned long flags;
252 252
253 raw_local_irq_save(flags); 253 local_irq_save(flags);
254 clock = sched_clock_cpu(cpu); 254 clock = sched_clock_cpu(cpu);
255 raw_local_irq_restore(flags); 255 local_irq_restore(flags);
256 256
257 return clock; 257 return clock;
258} 258}