提交 2d452c9b 编写于 作者: I Ingo Molnar

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: NVegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 4c9fe8ad
......@@ -250,9 +250,9 @@ unsigned long long cpu_clock(int cpu)
unsigned long long clock;
unsigned long flags;
raw_local_irq_save(flags);
local_irq_save(flags);
clock = sched_clock_cpu(cpu);
raw_local_irq_restore(flags);
local_irq_restore(flags);
return clock;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册