From: Andrew Morton Date: Sat, 26 Apr 2008 18:30:34 +0000 (-0700) Subject: sched: add debug checks to idle functions X-Git-Tag: v2.6.26-rc2~62^2~13 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d478c2cfaa2476f8b6876f9eb4d8fddcfa986479;p=linux-2.6-omap-h63xx.git sched: add debug checks to idle functions Cc: Venkatesh Pallipadi Cc: "Justin Mattock" Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar --- diff --git a/kernel/sched.c b/kernel/sched.c index 00c1ba706a5..ed3caf26990 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1124,6 +1124,7 @@ void sched_clock_idle_sleep_event(void) { struct rq *rq = cpu_rq(smp_processor_id()); + WARN_ON(!irqs_disabled()); spin_lock(&rq->lock); __update_rq_clock(rq); spin_unlock(&rq->lock); @@ -1139,6 +1140,7 @@ void sched_clock_idle_wakeup_event(u64 delta_ns) struct rq *rq = cpu_rq(smp_processor_id()); u64 now = sched_clock(); + WARN_ON(!irqs_disabled()); rq->idle_clock += delta_ns; /* * Override the previous timestamp and ignore all