Patchwork [1/3] ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel.

login
register
mail settings
Submitter Evgeny Voevodin
Date June 27, 2012, 3:55 a.m.
Message ID <1340769311-19692-2-git-send-email-e.voevodin@samsung.com>
Download mbox | patch
Permalink /patch/167497/
State New
Headers show

Comments

Evgeny Voevodin - June 27, 2012, 3:55 a.m.
From: Stanislav Vorobiov <s.vorobiov@samsung.com>

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>
---
 hw/exynos4210_mct.c |    4 ----
 1 file changed, 4 deletions(-)

Patch

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;
 }