Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/cortex fixed a case of gtmr_cntvct_stable_read(...



details:   https://anonhg.NetBSD.org/src/rev/cad3f9945946
branches:  trunk
changeset: 323652:cad3f9945946
user:      ryo <ryo%NetBSD.org@localhost>
date:      Sun Jun 24 19:04:30 2018 +0000

description:
fixed a case of gtmr_cntvct_stable_read() is returning the same value as before.

diffstat:

 sys/arch/arm/cortex/gtmr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8cdbeeb66bde -r cad3f9945946 sys/arch/arm/cortex/gtmr.c
--- a/sys/arch/arm/cortex/gtmr.c        Sun Jun 24 18:24:53 2018 +0000
+++ b/sys/arch/arm/cortex/gtmr.c        Sun Jun 24 19:04:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gtmr.c,v 1.30 2018/06/17 22:42:41 jmcneill Exp $       */
+/*     $NetBSD: gtmr.c,v 1.31 2018/06/24 19:04:30 ryo Exp $    */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.30 2018/06/17 22:42:41 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.31 2018/06/24 19:04:30 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -261,7 +261,7 @@
        while (ticks > 0) {
                arm_isb();
                uint64_t curr = gtmr_cntvct_stable_read(sc);
-               if (curr > last)
+               if (curr >= last)
                        ticks -= (curr - last);
                else
                        ticks -= (UINT64_MAX - curr + last);



Home | Main Index | Thread Index | Old Index