All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: Ian Campbell <ijc@hellion.org.uk>
Cc: grub-devel@gnu.org, Ian Campbell <ian.campbell@citrix.com>,
	Leif Lindholm <leif.lindholm@arm.com>
Subject: Re: [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units
Date: Sat, 21 Dec 2013 23:23:34 +0100	[thread overview]
Message-ID: <52B614E6.1090100@gmail.com> (raw)
In-Reply-To: <1387121014-19415-1-git-send-email-ijc@hellion.org.uk>

[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]

On 15.12.2013 16:23, Ian Campbell wrote:
> 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.
> 
During tests on my raspberry pi, I actually experienced the exact
opposite. On PI timer API is in microseconds.
Are you sure you made no mistake?

> 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
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 291 bytes --]

  parent reply	other threads:[~2013-12-21 22:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 15:23 [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units Ian Campbell
2013-12-15 17:00 ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-21 22:23 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
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=52B614E6.1090100@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=ian.campbell@citrix.com \
    --cc=ijc@hellion.org.uk \
    --cc=leif.lindholm@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.