svn commit: r299071 - head/sys/arm/arm

Bjoern A. Zeeb bz at FreeBSD.org
Wed May 4 16:09:52 UTC 2016


Author: bz
Date: Wed May  4 16:09:51 2016
New Revision: 299071
URL: https://svnweb.freebsd.org/changeset/base/299071

Log:
  The ARM generic timer keeps ticking even if disabled or it expired.
  In case of updating it with a very low value it might expire again
  after writing the tval but before updating ctrl. In that case we do
  lose the status bit saying that the timer expired and we will consequently
  not get an interrupt for it, leaving the timer in a "dead" state.
  
  In order to solve this increase the minimum period with what the timer
  can be loaded to something higher.
  
  Found & analysed with:	gem5
  Debugged with:		andrew
  Sponsored by:		DARPA/AFRL
  Reviewed by:		andrew
  MFC after:		2 weeks
  Differential Revision:	https://reviews.freebsd.org/D6202

Modified:
  head/sys/arm/arm/generic_timer.c

Modified: head/sys/arm/arm/generic_timer.c
==============================================================================
--- head/sys/arm/arm/generic_timer.c	Wed May  4 15:52:40 2016	(r299070)
+++ head/sys/arm/arm/generic_timer.c	Wed May  4 16:09:51 2016	(r299071)
@@ -417,7 +417,7 @@ arm_tmr_attach(device_t dev)
 	sc->et.et_quality = 1000;
 
 	sc->et.et_frequency = sc->clkfreq;
-	sc->et.et_min_period = (0x00000002LLU << 32) / sc->et.et_frequency;
+	sc->et.et_min_period = (0x00000010LLU << 32) / sc->et.et_frequency;
 	sc->et.et_max_period = (0xfffffffeLLU << 32) / sc->et.et_frequency;
 	sc->et.et_start = arm_tmr_start;
 	sc->et.et_stop = arm_tmr_stop;


More information about the svn-src-head mailing list