]> git.proxmox.com Git - mirror_qemu.git/commitdiff
ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel.
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Wed, 4 Jul 2012 10:43:30 +0000 (10:43 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 4 Jul 2012 10:43:30 +0000 (10:43 +0000)
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 <e.voevodin@samsung.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/exynos4210_mct.c

index 7474fcf802b3303543a17ae81b0858b530b06e6e..7a22b1f900a99848d1d3c9505921660b02327974 100644 (file)
@@ -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;
 }