Module Name:    src
Committed By:   jmcneill
Date:           Thu Nov 15 17:15:52 UTC 2018

Modified Files:
        src/sys/arch/arm/cortex: gtmr.c

Log Message:
A64 timer errata can cause the timer to fire too soon, so skip KASSERT here too.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 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.37 src/sys/arch/arm/cortex/gtmr.c:1.38
--- src/sys/arch/arm/cortex/gtmr.c:1.37	Tue Oct 30 10:38:11 2018
+++ src/sys/arch/arm/cortex/gtmr.c	Thu Nov 15 17:15:52 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: gtmr.c,v 1.37 2018/10/30 10:38:11 jmcneill Exp $	*/
+/*	$NetBSD: gtmr.c,v 1.38 2018/11/15 17:15:52 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.37 2018/10/30 10:38:11 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtmr.c,v 1.38 2018/11/15 17:15:52 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -282,9 +282,11 @@ gtmr_intr(void *arg)
 	}
 #endif
 
-	KASSERTMSG(delta > sc->sc_autoinc / 100,
-	    "%s: interrupting too quickly (delta=%"PRIu64") autoinc=%lu",
-	    ci->ci_data.cpu_name, delta, sc->sc_autoinc);
+	if (!ISSET(sc->sc_flags, GTMR_FLAG_SUN50I_A64_UNSTABLE_TIMER)) {
+		KASSERTMSG(delta > sc->sc_autoinc / 100,
+		    "%s: interrupting too quickly (delta=%"PRIu64") autoinc=%lu",
+		    ci->ci_data.cpu_name, delta, sc->sc_autoinc);
+	}
 
 	/*
 	 * If we got interrupted too soon (delta < sc->sc_autoinc)

Reply via email to