]> err.no Git - linux-2.6/commitdiff
sched: fix CONFIG_PRINT_TIME's reliance on sched_clock()
authorIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:07:58 +0000 (21:07 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:07:58 +0000 (21:07 +0100)
Stefano Brivio reported weird printk timestamp behavior during
CPU frequency changes:

  http://bugzilla.kernel.org/show_bug.cgi?id=9475

fix CONFIG_PRINT_TIME's reliance on sched_clock() and use cpu_clock()
instead.

Reported-and-bisected-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/printk.c

index e6c1f36d8c3a2624afb11ac919b52663e2c00aa9..5f9d053699f9548c7002d7717b7a345e2d63d03d 100644 (file)
@@ -707,7 +707,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
                                        loglev_char = default_message_loglevel
                                                + '0';
                                }
-                               t = printk_clock();
+                               t = cpu_clock(printk_cpu);
                                nanosec_rem = do_div(t, 1000000000);
                                tlen = sprintf(tbuf,
                                                "<%c>[%5lu.%06lu] ",