Skip to content

Commit

Permalink
init/main.c: use ktime accessor function in initcall_debug code
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Tim Bird <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
willnewton authored and Ingo Molnar committed Nov 23, 2008
1 parent a0a70c7 commit 1d926f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1d926f2

Please sign in to comment.