Message ID | 1e9bae4fae3c36430d7c28b0f486a0c71aff7eb3.1473252818.git.digetx@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1416160752 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 7 Sep 2016 13:24:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 025C0292C8 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 7 Sep 2016 13:24:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EB5E8292CF; Wed, 7 Sep 2016 13:24:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AB92E292C8 for <patchwork-qemu-devel@patchwork.kernel.org>; Wed, 7 Sep 2016 13:24:02 +0000 (UTC) Received: from localhost ([::1]:40980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org>) id 1bhcpd-0001aC-Qh for patchwork-qemu-devel@patchwork.kernel.org; Wed, 07 Sep 2016 09:24:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <digetx@gmail.com>) id 1bhcp1-0001Z5-LG for qemu-devel@nongnu.org; Wed, 07 Sep 2016 09:23:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <digetx@gmail.com>) id 1bhcow-0005eb-SH for qemu-devel@nongnu.org; Wed, 07 Sep 2016 09:23:23 -0400 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:32840) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <digetx@gmail.com>) id 1bhcow-0005eO-KP; Wed, 07 Sep 2016 09:23:18 -0400 Received: by mail-lf0-x242.google.com with SMTP id l131so830514lfl.0; Wed, 07 Sep 2016 06:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=wCWmRwHvjsbJnKaba/0OQZmjYp872mE9u5B3/V5czuI=; b=fIG4ycxU/s+C+KtkHsEXofqCPpM6ahOISuxfhgXntCqtX7DsRYh6tf4MZQqYyrmCh8 C9tmc0Qu6OBqVMGxndUwkM6ptS315SNbxwgR5aVT3FkBDPSOY6k7jW91ZzFXShUG2eB1 IDPnlF6k8NpyTVVsaGTtWCPMeDk5M8prOORuZCZFei6fDyC7Lk7QrLCsTiWaHzvxP/lB roxCAcIWG3mpo8am2IQVKwE1wVFpxhMjN0PKb5+zi5iKqu5Z735CjgjS7IkffyBFQiMf bQATnjWcoDaMxRmv9RXkxIUUoJ81wMbvZoreqXozKT3ZwMBs/HkzrJXQ6BITlUZ8w6BA da6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=wCWmRwHvjsbJnKaba/0OQZmjYp872mE9u5B3/V5czuI=; b=GfiFDfnd/WWmZ5NJhxxrW7I5Ctcy8Dqh0w+hwnRu3HJh+7d58fz2PSRTSrP0xGsYbA znhLTYuhtl+5KnDTLGshCVhjSF/Ia8sRkXWCoeVVbE35GltJCtgt2qsk5+hvF88YKQUI CotWttxvyxIJQdbVMx0nYTGU1NTumuckDjCufTgJavfF0KMXUeItRaGQ0BRRpLD2gTkG olIcfyI8h2Qo5QMzi0cyKPjKdjNlsKoixNGIvkqHvgA3Q5c9xcPpj+tYRQpPBe8JLUDJ kM9yfD1NGDilRA/Az3X2CmV3gjJiv90GZGvGDD48Rlxcv2/fbAAmh1ji/hNxhNLTMc2e NL+A== X-Gm-Message-State: AE9vXwMQ0PzFDz+XzxVLmLRVl0ZoyWWcotz4JqPUR5NQYttvUq77cCSJrHb6DJK3ySZNSA== X-Received: by 10.25.228.217 with SMTP id x86mr11604lfi.137.1473254596746; Wed, 07 Sep 2016 06:23:16 -0700 (PDT) Received: from localhost.localdomain (ppp109-252-52-17.pppoe.spdop.ru. [109.252.52.17]) by smtp.gmail.com with ESMTPSA id h29sm11375lfi.18.2016.09.07.06.23.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Sep 2016 06:23:16 -0700 (PDT) From: Dmitry Osipenko <digetx@gmail.com> To: QEMU Developers <qemu-devel@nongnu.org>, qemu-arm@nongnu.org Date: Wed, 7 Sep 2016 16:22:12 +0300 Message-Id: <1e9bae4fae3c36430d7c28b0f486a0c71aff7eb3.1473252818.git.digetx@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <cover.1473252818.git.digetx@gmail.com> References: <cover.1473252818.git.digetx@gmail.com> In-Reply-To: <cover.1473252818.git.digetx@gmail.com> References: <cover.1473252818.git.digetx@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::242 Subject: [Qemu-devel] [PATCH v16 01/16] hw/ptimer: Actually stop the timer in case of error X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Peter Maydell <peter.maydell@linaro.org>, Peter Crosthwaite <crosthwaitepeter@gmail.com> Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 30829ee..02c3135 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -44,6 +44,7 @@ static void ptimer_reload(ptimer_state *s) } if (s->delta == 0 || s->period == 0) { fprintf(stderr, "Timer with period zero, disabling\n"); + timer_del(s->timer); s->enabled = 0; return; }
Running with counter / period = 0 is treated as a error case, printing error message claiming that timer has been disabled. However, timer is only marked as disabled, keeping to tick till expired and triggering after being claimed as disabled. Stop the QEMU timer to avoid confusion. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- hw/core/ptimer.c | 1 + 1 file changed, 1 insertion(+)