提交 d478c2cf 编写于 作者: A Andrew Morton 提交者: Ingo Molnar

sched: add debug checks to idle functions

Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: "Justin Mattock" <justinmattock@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 733a0771
...@@ -1124,6 +1124,7 @@ void sched_clock_idle_sleep_event(void) ...@@ -1124,6 +1124,7 @@ void sched_clock_idle_sleep_event(void)
{ {
struct rq *rq = cpu_rq(smp_processor_id()); struct rq *rq = cpu_rq(smp_processor_id());
WARN_ON(!irqs_disabled());
spin_lock(&rq->lock); spin_lock(&rq->lock);
__update_rq_clock(rq); __update_rq_clock(rq);
spin_unlock(&rq->lock); spin_unlock(&rq->lock);
...@@ -1139,6 +1140,7 @@ void sched_clock_idle_wakeup_event(u64 delta_ns) ...@@ -1139,6 +1140,7 @@ void sched_clock_idle_wakeup_event(u64 delta_ns)
struct rq *rq = cpu_rq(smp_processor_id()); struct rq *rq = cpu_rq(smp_processor_id());
u64 now = sched_clock(); u64 now = sched_clock();
WARN_ON(!irqs_disabled());
rq->idle_clock += delta_ns; rq->idle_clock += delta_ns;
/* /*
* Override the previous timestamp and ignore all * Override the previous timestamp and ignore all
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册