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 Use physical timer for gtmr_delay();



details:   https://anonhg.NetBSD.org/src/rev/686113bb7786
branches:  trunk
changeset: 337589:686113bb7786
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Apr 20 20:19:52 2015 +0000

description:
Use physical timer for gtmr_delay();

diffstat:

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

diffs (32 lines):

diff -r cab2bf4ad737 -r 686113bb7786 sys/arch/arm/cortex/gtmr.c
--- a/sys/arch/arm/cortex/gtmr.c        Mon Apr 20 20:15:22 2015 +0000
+++ b/sys/arch/arm/cortex/gtmr.c        Mon Apr 20 20:19:52 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gtmr.c,v 1.15 2015/04/12 17:08:25 matt Exp $   */
+/*     $NetBSD: gtmr.c,v 1.16 2015/04/20 20:19:52 matt Exp $   */
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.15 2015/04/12 17:08:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.16 2015/04/20 20:19:52 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -246,11 +246,11 @@
        const uint64_t incr_per_us = (freq >> 20) + (freq >> 24);
 
        arm_isb();
-       const uint64_t base = armreg_cntv_ct_read();
+       const uint64_t base = armreg_cntp_ct_read();
        const uint64_t delta = n * incr_per_us;
        const uint64_t finish = base + delta;
 
-       while (armreg_cntv_ct_read() < finish) {
+       while (armreg_cntp_ct_read() < finish) {
                arm_isb();      /* spin */
        }
 }



Home | Main Index | Thread Index | Old Index