All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] arm_mptimer: Fix timer shutdown
Date: Thu, 02 Jul 2015 15:10:05 +0300	[thread overview]
Message-ID: <55952A1D.2030806@gmail.com> (raw)
In-Reply-To: <CAFEAcA_zE9UVS2L82-5Jhh_TKeWCQ8ms2KvFuZhhsfyk1PqJug@mail.gmail.com>

Hello Peter, thanks a lot for comment.

02.07.2015 12:27, Peter Maydell пишет:
> Thanks; this does look like a bug. This change will mean we
> call timer_del() even if the timer was already disabled,
> though, so I think it would be slightly better to rearrange
> the existing logic something like this:
>
>    if ((old & 1) != (value & 1)) {
>       if (value & 1) {
>           if (tb->count == 0 && (tb->control & 2)) {
>               tb->count = tb->load;
>           }
>           timerblock_reload(tb, 1);
>       } else {
>           timer_del(tb->timer);
>       }
>    }
>
> thanks
> -- PMM
>

Calling timer_del() twice is safe, but I agree that it would be better to avoid 
it. I'll send V2.

-- 
Dmitry

  reply	other threads:[~2015-07-02 12:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-01 21:15 [Qemu-devel] [PATCH] arm_mptimer: Fix timer shutdown Dmitry Osipenko
2015-07-02  9:27 ` Peter Maydell
2015-07-02 12:10   ` Dmitry Osipenko [this message]
2015-07-02 17:20     ` [Qemu-devel] [PATCH v2] " Dmitry Osipenko
2015-07-02 17:34       ` Peter Maydell
2015-07-02 17:43         ` Dmitry Osipenko
2015-07-02 17:52         ` Dmitry Osipenko
2015-07-02 18:09           ` Peter Maydell
2015-07-02 18:43             ` Dmitry Osipenko
2015-07-02 18:50               ` Dmitry Osipenko
2015-07-03 11:41               ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55952A1D.2030806@gmail.com \
    --to=digetx@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.