From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VsDXp-0005Ww-CV for mharc-grub-devel@gnu.org; Sun, 15 Dec 2013 10:23:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsDXk-0005We-0r for grub-devel@gnu.org; Sun, 15 Dec 2013 10:23:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsDXe-0008S9-Cj for grub-devel@gnu.org; Sun, 15 Dec 2013 10:23:43 -0500 Received: from smtp.citrix.com ([66.165.176.89]:57701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsDXe-0008Ro-8P for grub-devel@gnu.org; Sun, 15 Dec 2013 10:23:38 -0500 X-IronPort-AV: E=Sophos;i="4.95,489,1384300800"; d="scan'208";a="84702691" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 15 Dec 2013 15:23:36 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Sun, 15 Dec 2013 10:23:35 -0500 Received: from marilith-n13-p0.uk.xensource.com ([10.80.229.115] helo=marilith-n13.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1VsDXa-0001ie-U7; Sun, 15 Dec 2013 15:23:34 +0000 From: Ian Campbell To: Subject: [PATCH] * grub-core/kern/uboot/init.c (uboot_timer_ms) correct units Date: Sun, 15 Dec 2013 15:23:34 +0000 Message-ID: <1387121014-19415-1-git-send-email-ijc@hellion.org.uk> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 Content-Type: text/plain X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Cc: Vladimir 'phcoder' Serbinenko , Ian Campbell , Leif Lindholm X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2013 15:23:48 -0000 From: Ian Campbell 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 Cc: Leif Lindholm --- 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