From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmNXZ-0001WE-DY for qemu-devel@nongnu.org; Wed, 04 Jul 2012 07:14:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SmNXT-0005S6-09 for qemu-devel@nongnu.org; Wed, 04 Jul 2012 07:14:36 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:41862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SmNXS-0005PW-Po for qemu-devel@nongnu.org; Wed, 04 Jul 2012 07:14:30 -0400 From: Peter Maydell Date: Wed, 4 Jul 2012 12:14:05 +0100 Message-Id: <1341400454-20145-2-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1341400454-20145-1-git-send-email-peter.maydell@linaro.org> References: <1341400454-20145-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 01/10] 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: Anthony Liguori , Blue Swirl Cc: qemu-devel@nongnu.org, Paul Brook 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 Signed-off-by: Peter Maydell --- hw/exynos4210_mct.c | 4 ---- 1 files changed, 0 insertions(+), 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.1