init/main.c: use ktime accessor function in initcall_debug code
authorWill Newton <will.newton@gmail.com>
Fri, 21 Nov 2008 22:08:59 +0000 (14:08 -0800)
committerIngo Molnar <mingo@elte.hu>
Sun, 23 Nov 2008 10:10:15 +0000 (11:10 +0100)
Impact: fix initcall debug output on non-scalar ktime platforms (32-bit embedded)

The initcall_debug code access the tv64 member of ktime.  This won't work
correctly for large deltas on platforms that don't use the scalar ktime
implementation.

Signed-off-by: Will Newton <will.newton@gmail.com>
Acked-by: Tim Bird <tim.bird@am.sony.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
init/main.c

index e810196bf2f2ae2522fd7ce1ec0dbae3d7f6ebd9..79213c0785d293adc69165ec37899c2517793046 100644 (file)
@@ -723,7 +723,7 @@ int do_one_initcall(initcall_t fn)
                disable_boot_trace();
                rettime = ktime_get();
                delta = ktime_sub(rettime, calltime);
-               ret.duration = (unsigned long long) delta.tv64 >> 10;
+               ret.duration = (unsigned long long) ktime_to_ns(delta) >> 10;
                trace_boot_ret(&ret, fn);
                printk("initcall %pF returned %d after %Ld usecs\n", fn,
                        ret.result, ret.duration);