From: Ian Campbell <ijc@hellion.org.uk>
To: <grub-devel@gnu.org>
Cc: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>,
Ian Campbell <ian.campbell@citrix.com>,
Leif Lindholm <leif.lindholm@arm.com>
Subject: [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units
Date: Sun, 15 Dec 2013 15:23:34 +0000 [thread overview]
Message-ID: <1387121014-19415-1-git-send-email-ijc@hellion.org.uk> (raw)
From: Ian Campbell <ian.campbell@citrix.com>
u-boot's API_GET_TIMER returns the current time in ms by directly exposing the
internal get_timer which is in ms, which isn't all that clearly documented but
is obvious from the use within u-boot and is mentioned in
http://www.denx.de/wiki/U-Boot/TaskTimerAPI.
This was put wrong in 4e13e84e56f7 "Fix timer units".
Without this it takes 5000s to count down to the automatic boot of the selected
option (or I assume it would, I never waited...)
Cc: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Cc: Leif Lindholm <leif.lindholm@arm.com>
---
grub-core/kern/uboot/init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/grub-core/kern/uboot/init.c b/grub-core/kern/uboot/init.c
index b108de3..2e9d382 100644
--- a/grub-core/kern/uboot/init.c
+++ b/grub-core/kern/uboot/init.c
@@ -66,8 +66,7 @@ uboot_timer_ms (void)
if (cur < last)
high++;
last = cur;
- return grub_divmod64 ((((grub_uint64_t) high) << 32) | cur,
- 1000, 0);
+ return (((grub_uint64_t) high) << 32) | cur;
}
void
--
1.7.10.4
next reply other threads:[~2013-12-15 15:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-15 15:23 Ian Campbell [this message]
2013-12-15 17:00 ` [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-21 22:23 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-22 1:21 ` Ian Campbell
2013-12-22 1:29 ` Ian Campbell
2013-12-22 1:52 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=1387121014-19415-1-git-send-email-ijc@hellion.org.uk \
--to=ijc@hellion.org.uk \
--cc=grub-devel@gnu.org \
--cc=ian.campbell@citrix.com \
--cc=leif.lindholm@arm.com \
--cc=phcoder@gmail.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;
as well as URLs for NNTP newsgroup(s).