From: "Will Newton" <will.newton@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: "Tim Bird" <tim.bird@am.sony.com>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: [PATCH] init/main.c: Use ktime accessor function in initcall_debug code.
Date: Thu, 20 Nov 2008 14:47:50 +0000 [thread overview]
Message-ID: <87a5b0800811200647t4de76a2ah683ac6083014d061@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 796 bytes --]
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.2
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-init-main.c-Use-ktime-accessor-function-in-initcall.patch --]
[-- Type: text/x-patch; name=0001-init-main.c-Use-ktime-accessor-function-in-initcall.patch, Size: 1014 bytes --]
From 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
next reply other threads:[~2008-11-20 15:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 14:47 Will Newton [this message]
2008-11-20 17:39 ` Tim Bird
2008-11-20 17:46 ` Will Newton
2008-11-20 18:28 ` Tim Bird
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a5b0800811200647t4de76a2ah683ac6083014d061@mail.gmail.com \
--to=will.newton@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tim.bird@am.sony.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®