diff options
Diffstat (limited to 'sys/arch/armv7')
-rw-r--r-- | sys/arch/armv7/omap/dmtimer.c | 6 | ||||
-rw-r--r-- | sys/arch/armv7/omap/gptimer.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/armv7/omap/dmtimer.c b/sys/arch/armv7/omap/dmtimer.c index b8fbe794854..3da781f1ca1 100644 --- a/sys/arch/armv7/omap/dmtimer.c +++ b/sys/arch/armv7/omap/dmtimer.c @@ -253,7 +253,7 @@ dmtimer_intr(void *frame) stat_count.ec_count++; statclock(frame); } - if ((now - sc->sc_nexttickevent) < (now - sc->sc_nextstatevent)) + if ((sc->sc_nexttickevent - now) < (sc->sc_nextstatevent - now)) nextevent = sc->sc_nexttickevent; else nextevent = sc->sc_nextstatevent; @@ -261,10 +261,8 @@ dmtimer_intr(void *frame) duration = nextevent - bus_space_read_4(sc->sc_iot, sc->sc_ioh[1], DM_TCRR); - if (duration <= 0) { - printf("%s: negative duration!\n", __func__); + if (duration <= 0) duration = 1; /* trigger immediately. */ - } if (duration > sc->sc_ticks_per_intr + 1) { printf("%s: time lost!\n", __func__); diff --git a/sys/arch/armv7/omap/gptimer.c b/sys/arch/armv7/omap/gptimer.c index a750cf51c5f..e5fd9965ded 100644 --- a/sys/arch/armv7/omap/gptimer.c +++ b/sys/arch/armv7/omap/gptimer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gptimer.c,v 1.3 2014/05/08 21:17:01 miod Exp $ */ +/* $OpenBSD: gptimer.c,v 1.4 2014/06/20 14:08:11 rapha Exp $ */ /* * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org> * @@ -233,7 +233,7 @@ gptimer_intr(void *frame) stat_count.ec_count++; statclock(frame); } - if ((now - nexttickevent) < (now - nextstatevent)) + if ((nexttickevent - now) < (nextstatevent - now)) nextevent = nexttickevent; else nextevent = nextstatevent; |