From patchwork Fri Jun 22 07:22:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel. Date: Thu, 21 Jun 2012 21:22:24 -0000 From: Evgeny Voevodin X-Patchwork-Id: 166538 Message-Id: <1340349744-23920-1-git-send-email-e.voevodin@samsung.com> To: qemu-devel@nongnu.org Cc: m.shcherbina@samsung.com, o.ogurtsov@samsung.com, i.mitsyanko@samsung.com, Evgeny Voevodin , peter.maydell@linaro.org, kyungmin.park@samsung.com, d.solodkiy@samsung.com, s.vorobiov@samsung.com, m.kozlov@samsung.com From: Stanislav Vorobiov After some long period of time Linux kernel hanged due to ptimer_get_count may return 0 before timer interrupt occurs, thus, causing FRC to jump back in time Signed-off-by: Evgeny Voevodin --- hw/exynos4210_mct.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/exynos4210_mct.c b/hw/exynos4210_mct.c index 7474fcf..7a22b1f 100644 --- a/hw/exynos4210_mct.c +++ b/hw/exynos4210_mct.c @@ -376,10 +376,6 @@ static uint64_t exynos4210_gfrc_get_count(Exynos4210MCTGT *s) { uint64_t count = 0; count = ptimer_get_count(s->ptimer_frc); - if (!count) { - /* Timer event was generated and s->reg.cnt holds adequate value */ - return s->reg.cnt; - } count = s->count - count; return s->reg.cnt + count; }