Received: from eggs.gnu.org ([208.118.235.92]:48395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShyCY-0000B8-Fc for qemu-devel@nongnu.org; Fri, 22 Jun 2012 03:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShyCU-0004e4-5P for qemu-devel@nongnu.org; Fri, 22 Jun 2012 03:22:42 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:28313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShyCT-0004dX-Vs for qemu-devel@nongnu.org; Fri, 22 Jun 2012 03:22:38 -0400 Received: from eusync4.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M6000EZSCIJEU10@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 22 Jun 2012 08:23:07 +0100 (BST) Received: from evvoevodinPC.rnd.samsung.ru ([106.109.8.38]) by eusync4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M60007F8CHE4X30@eusync4.samsung.com> for qemu-devel@nongnu.org; Fri, 22 Jun 2012 08:22:31 +0100 (BST) From: Evgeny Voevodin Date: Fri, 22 Jun 2012 11:22:24 +0400 Message-id: <1340349744-23920-1-git-send-email-e.voevodin@samsung.com> Subject: [Qemu-devel] [PATCH] ARM: hw/exynos4210_mct.c: Fix a bug which hangs Linux kernel. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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; } -- 1.7.9.5