* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: sched: enable early use of sched_clock() lockdep: make cli/sti annotation warnings clearer
···26542654 if (!debug_locks)26552655 return;2656265626572657- if (irqs_disabled_flags(flags))26582658- DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled);26592659- else26602660- DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled);26572657+ if (irqs_disabled_flags(flags)) {26582658+ if (DEBUG_LOCKS_WARN_ON(current->hardirqs_enabled)) {26592659+ printk("possible reason: unannotated irqs-off.\n");26602660+ }26612661+ } else {26622662+ if (DEBUG_LOCKS_WARN_ON(!current->hardirqs_enabled)) {26632663+ printk("possible reason: unannotated irqs-on.\n");26642664+ }26652665+ }2661266626622667 /*26632668 * We dont accurately track softirq state in e.g.
+6-1
kernel/sched.c
···488488489489 local_irq_save(flags);490490 rq = cpu_rq(cpu);491491- update_rq_clock(rq);491491+ /*492492+ * Only call sched_clock() if the scheduler has already been493493+ * initialized (some code might call cpu_clock() very early):494494+ */495495+ if (rq->idle)496496+ update_rq_clock(rq);492497 now = rq->clock;493498 local_irq_restore(flags);494499