Module Name: src
Committed By: reinoud
Date: Thu Aug 28 12:00:59 UTC 2014
Modified Files:
src/sys/arch/arm/samsung: mct.c
Log Message:
Substract just one each time instead of the periods missed. This will create a
more even representation of missed interrupts.
Also fix typo
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/samsung/mct.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/samsung/mct.c
diff -u src/sys/arch/arm/samsung/mct.c:1.3 src/sys/arch/arm/samsung/mct.c:1.4
--- src/sys/arch/arm/samsung/mct.c:1.3 Fri Aug 8 14:43:14 2014
+++ src/sys/arch/arm/samsung/mct.c Thu Aug 28 12:00:58 2014
@@ -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 @@ clockhandler(void *arg)
/* 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 @@ clockhandler(void *arg)
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,