]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
cmd_dhry.c: Use lldiv for vax_mips calculation as well
authorTom Rini <trini@konsulko.com>
Thu, 17 Mar 2016 14:14:25 +0000 (10:14 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 17 Mar 2016 14:14:25 +0000 (10:14 -0400)
Since dhry_per_sec is a u64 we must also use lldiv here when working
with it.  Otherwise:
../lib/dhry/cmd_dhry.c:(.text.do_dhry+0xd8): undefined reference to `__udivdi3'

On some platforms.

Signed-off-by: Tom Rini <trini@konsulko.com>
lib/dhry/cmd_dhry.c

index d7e1e6a99ba9b7d0f63ece0f32dc7cb0213ad297..f44305bfcfa78d98e409ac0c9f9061016b747ad9 100644 (file)
@@ -22,7 +22,7 @@ static int do_dhry(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        dhry(iterations);
        duration = get_timer(start);
        dhry_per_sec = lldiv(iterations * 1000ULL, duration);
-       vax_mips = dhry_per_sec / 1757;
+       vax_mips = lldiv(dhry_per_sec, 1757);
        printf("%d iterations in %lu ms: %lu/s, %lu DMIPS\n", iterations,
               duration, (ulong)dhry_per_sec, vax_mips);