All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [RFC 3/4] ptimer: Provide new transaction-based API
Date: Fri, 4 Oct 2019 13:56:48 +0100	[thread overview]
Message-ID: <CAFEAcA97dyR2_A72OgfJ6M68jC7Qv+zat74AobPUGNi12RWxLQ@mail.gmail.com> (raw)
In-Reply-To: <20191004114848.16831-4-peter.maydell@linaro.org>

On Fri, 4 Oct 2019 at 12:48, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Provide the new transaction-based API.


> +void ptimer_transaction_begin(ptimer_state *s)
> +{
> +    assert(!s->in_transaction && s->callback);
> +    s->in_transaction = true;

As I was working on converting the ptimer tests to the new
API I noticed a silly bug here -- we should set
       s->need_reload = false;
in ptimer_transaction_begin(). Otherwise one transaction has
decided to do a reload, we'll do a reload in commit every time,
including when that's bogus (eg when the timer is disabled)...

thanks
-- PMM


  reply	other threads:[~2019-10-04 13:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 11:48 [RFC 0/4] transaction-based ptimer API Peter Maydell
2019-10-04 11:48 ` [RFC 1/4] hw/timer/arm_timer: Add trace events Peter Maydell
2019-10-07 13:19   ` Richard Henderson
2019-10-04 11:48 ` [RFC 2/4] ptimer: Rename ptimer_init() to ptimer_init_with_bh() Peter Maydell
2019-10-07 13:20   ` Richard Henderson
2019-10-04 11:48 ` [RFC 3/4] ptimer: Provide new transaction-based API Peter Maydell
2019-10-04 12:56   ` Peter Maydell [this message]
2019-10-07 13:30   ` Richard Henderson
2019-10-04 11:48 ` [RFC 4/4] hw/timer/arm_timer.c: Switch to transaction-based ptimer API Peter Maydell
2019-10-07 13:32   ` Richard Henderson
2019-10-04 11:57 ` [RFC 0/4] " Paolo Bonzini
2019-10-04 12:00   ` Peter Maydell
2019-10-04 12:08     ` Paolo Bonzini

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=CAFEAcA97dyR2_A72OgfJ6M68jC7Qv+zat74AobPUGNi12RWxLQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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.