Module Name: src Committed By: jmcneill Date: Sat Sep 9 13:14:30 UTC 2017
Modified Files: src/sys/arch/arm/cortex: gtmr.c Log Message: gtmr_intr: If the ISTATUS bit is 0, timer condition is not met. In this case, just return 0. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/cortex/gtmr.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/cortex/gtmr.c diff -u src/sys/arch/arm/cortex/gtmr.c:1.19 src/sys/arch/arm/cortex/gtmr.c:1.20 --- src/sys/arch/arm/cortex/gtmr.c:1.19 Thu Aug 24 13:06:23 2017 +++ src/sys/arch/arm/cortex/gtmr.c Sat Sep 9 13:14:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: gtmr.c,v 1.19 2017/08/24 13:06:23 jmcneill Exp $ */ +/* $NetBSD: gtmr.c,v 1.20 2017/09/09 13:14:30 jmcneill Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.19 2017/08/24 13:06:23 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.20 2017/09/09 13:14:30 jmcneill Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -292,6 +292,10 @@ gtmr_intr(void *arg) arm_isb(); + const uint32_t ctl = armreg_cntv_ctl_read(); + if ((ctl & ARM_CNTCTL_ISTATUS) == 0) + return 0; + const uint64_t now = armreg_cntv_ct_read(); uint64_t delta = now - ci->ci_lastintr;