Module Name: src
Committed By: snj
Date: Mon Sep 11 05:25:20 UTC 2017
Modified Files:
src/sys/arch/arm/cortex [netbsd-8]: gtmr.c
Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #271):
sys/arch/arm/cortex/gtmr.c: revision 1.20
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.17.2.1 -r1.17.2.2 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.17.2.1 src/sys/arch/arm/cortex/gtmr.c:1.17.2.2
--- src/sys/arch/arm/cortex/gtmr.c:1.17.2.1 Wed Jun 21 17:47:48 2017
+++ src/sys/arch/arm/cortex/gtmr.c Mon Sep 11 05:25:20 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: gtmr.c,v 1.17.2.1 2017/06/21 17:47:48 snj Exp $ */
+/* $NetBSD: gtmr.c,v 1.17.2.2 2017/09/11 05:25:20 snj Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.17.2.1 2017/06/21 17:47:48 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.17.2.2 2017/09/11 05:25:20 snj 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;