From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm6Ya-0005po-L8 for qemu-devel@nongnu.org; Tue, 13 Oct 2015 16:52:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zm6YV-0000Cg-LD for qemu-devel@nongnu.org; Tue, 13 Oct 2015 16:52:24 -0400 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]:34378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zm6YV-0000CJ-ER for qemu-devel@nongnu.org; Tue, 13 Oct 2015 16:52:19 -0400 Received: by lfaz124 with SMTP id z124so2341255lfa.1 for ; Tue, 13 Oct 2015 13:52:18 -0700 (PDT) References: <1444745463-10918-1-git-send-email-digetx@gmail.com> <561D257E.5040700@gmail.com> From: Dmitry Osipenko Message-ID: <561D6EDD.9080209@gmail.com> Date: Tue, 13 Oct 2015 23:51:41 +0300 MIME-Version: 1.0 In-Reply-To: <561D257E.5040700@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4] arm_mptimer: Convert to use ptimer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , Peter Maydell Cc: QEMU Developers 13.10.2015 18:38, Dmitry Osipenko пишет: > 13.10.2015 17:11, Dmitry Osipenko пишет: >> + ptimer_set_limit(tb->timer, value, 0); >> + ptimer_set_count(tb->timer, value); >> > > Umm... looking more at these lines, I think it might put in a trouble in some > corner case. It might worth trying to make ptimer more flexible rather than to > workaround it's imperfection. > I looked into moving specific trigger/start/stop logic into the ptimer and it really doesn't worth churning the ptimer code, since no other device has similar requirements (or they are just incomplete/broken). I'll add one-line patch in V5 for ptimer_set_limit() to make ptimer_get_count() return correct value for the disabled timer, so we won't need the above ad-hoc. -- Dmitry