Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/samsung Substract just one each time instead of...



details:   https://anonhg.NetBSD.org/src/rev/54456b0e01f1
branches:  trunk
changeset: 331876:54456b0e01f1
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Thu Aug 28 12:00:58 2014 +0000

description:
Substract just one each time instead of the periods missed. This will create a
more even representation of missed interrupts.

Also fix typo

diffstat:

 sys/arch/arm/samsung/mct.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 667c79e55c6c -r 54456b0e01f1 sys/arch/arm/samsung/mct.c
--- a/sys/arch/arm/samsung/mct.c        Thu Aug 28 11:51:02 2014 +0000
+++ b/sys/arch/arm/samsung/mct.c        Thu Aug 28 12:00:58 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mct.c,v 1.3 2014/08/08 14:43:14 reinoud Exp $  */
+/*     $NetBSD: mct.c,v 1.4 2014/08/28 12:00:58 reinoud Exp $  */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(1, "$NetBSD: mct.c,v 1.3 2014/08/08 14:43:14 reinoud Exp $");
+__KERNEL_RCSID(1, "$NetBSD: mct.c,v 1.4 2014/08/28 12:00:58 reinoud Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -239,7 +239,7 @@
        /* ack the interrupt */
        mct_write_global(sc, MCT_G_INT_CSTAT, G_INT_CSTAT_CLEAR);
 
-       /* check if we periods clock interrupts */
+       /* check if we missed clock interrupts */
        if (periods > 1)
                sc->sc_ev_missing_ticks.ev_count += periods - 1;
 
@@ -247,7 +247,8 @@
        hardclock(cf);
 
        if (sc->sc_has_blink_led) {
-               sc->sc_led_timer = sc->sc_led_timer - periods - 1;
+               /* we could substract `periods' here */
+               sc->sc_led_timer = sc->sc_led_timer - 1;
                if (sc->sc_led_timer <= 0) {
                        sc->sc_led_state = !sc->sc_led_state;
                        exynos_gpio_pindata_write(&sc->sc_gpio_led,



Home | Main Index | Thread Index | Old Index