lkml.org 
[lkml]   [2008]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] init/main.c: Use ktime accessor function in initcall_debug code.
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>
---
init/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/init/main.c b/init/main.c
index 7e117a2..0eff42a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -718,7 +718,7 @@ int do_one_initcall(initcall_t fn)
if (initcall_debug) {
it.rettime = ktime_get();
delta = ktime_sub(it.rettime, it.calltime);
- it.duration = (unsigned long long) delta.tv64 >> 10;
+ it.duration = (unsigned long long) ktime_to_ns(delta) >> 10;
printk("initcall %pF returned %d after %Ld usecs\n", fn,
it.result, it.duration);
trace_boot(&it, fn);
--
1.5.5.2From e9697ec9db4d04b9c615d34b76571afabaa8dfb1 Mon Sep 17 00:00:00 2001
From: Will Newton <will.newton@gmail.com>
Date: Thu, 20 Nov 2008 14:11:54 +0000
Subject: [PATCH] init/main.c: Use ktime accessor function in initcall_debug code.
The initcall_debug code access the tv64 member of ktime. This won't work
correctly on platforms that don't use the scalar ktime implementation.

Signed-off-by: Will Newton <will.newton@gmail.com>
---
init/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/init/main.c b/init/main.c
index 7e117a2..0eff42a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -718,7 +718,7 @@ int do_one_initcall(initcall_t fn)
if (initcall_debug) {
it.rettime = ktime_get();
delta = ktime_sub(it.rettime, it.calltime);
- it.duration = (unsigned long long) delta.tv64 >> 10;
+ it.duration = (unsigned long long) ktime_to_ns(delta) >> 10;
printk("initcall %pF returned %d after %Ld usecs\n", fn,
it.result, it.duration);
trace_boot(&it, fn);
--
1.5.5.2
\
 
 \ /
  Last update: 2008-11-20 16:05    [from the cache]
©2003-2011 Jasper Spaans