Date: Wed, 4 May 2016 16:09:51 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299071 - head/sys/arm/arm Message-ID: <201605041609.u44G9p4k035011@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605041609.u44G9p4k035011>