aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-04-26 14:30:34 -0400
committerIngo Molnar <mingo@elte.hu>2008-05-05 17:56:17 -0400
commitd478c2cfaa2476f8b6876f9eb4d8fddcfa986479 (patch)
tree59cb264c539147cb481e13335ff3c69750e16c67
parent733a0771df46af942b8355cd8bb15780106b4353 (diff)
sched: add debug checks to idle functions
Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Cc: "Justin Mattock" <justinmattock@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 00c1ba706a5a..ed3caf26990d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1124,6 +1124,7 @@ void sched_clock_idle_sleep_event(void)
1124{ 1124{
1125 struct rq *rq = cpu_rq(smp_processor_id()); 1125 struct rq *rq = cpu_rq(smp_processor_id());
1126 1126
1127 WARN_ON(!irqs_disabled());
1127 spin_lock(&rq->lock); 1128 spin_lock(&rq->lock);
1128 __update_rq_clock(rq); 1129 __update_rq_clock(rq);
1129 spin_unlock(&rq->lock); 1130 spin_unlock(&rq->lock);
@@ -1139,6 +1140,7 @@ void sched_clock_idle_wakeup_event(u64 delta_ns)
1139 struct rq *rq = cpu_rq(smp_processor_id()); 1140 struct rq *rq = cpu_rq(smp_processor_id());
1140 u64 now = sched_clock(); 1141 u64 now = sched_clock();
1141 1142
1143 WARN_ON(!irqs_disabled());
1142 rq->idle_clock += delta_ns; 1144 rq->idle_clock += delta_ns;
1143 /* 1145 /*
1144 * Override the previous timestamp and ignore all 1146 * Override the previous timestamp and ignore all