From: Paolo Bonzini <pbonzini@redhat.com>
To: Alex Bligh <alex@alex.org.uk>, Matt Lupfer <mlupfer@ddn.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled
Date: Sat, 22 Feb 2014 11:55:25 +0100 [thread overview]
Message-ID: <5308821D.9060707@redhat.com> (raw)
In-Reply-To: <16222845-E68D-4E40-8365-083EEBAC48D8@alex.org.uk>
Il 22/02/2014 10:03, Alex Bligh ha scritto:
> I am unfamiliar with the HPET code but symmetry suggests perhaps the 'else'
> condition should be changed too:
>
> } else if (deactivating_bit(old_val, new_val, HPET_TN_ENABLE) ||
> !hpet_enabled(s)) {
> hpet_del_timer(timer);
> }
>
> --
I thought the same, but there is no need for that. When the enabled bit goes
from set to clear, all timers are disabled:
} else if (deactivating_bit(old_val, new_val, HPET_CFG_ENABLE)) {
/* Halt main counter and disable interrupt generation. */
s->hpet_counter = hpet_get_ticks(s);
for (i = 0; i < s->num_timers; i++) {
hpet_del_timer(&s->timer[i]);
}
}
So hpet_del_timer would be a nop if !hpet_enabled(s).
Paolo
next prev parent reply other threads:[~2014-02-22 10:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-22 4:37 [Qemu-devel] [PATCH] Don't enable a HPET timer if HPET is disabled Matt Lupfer
2014-02-22 9:01 ` Paolo Bonzini
2014-03-26 20:20 ` Matt Lupfer
2014-03-27 12:17 ` Paolo Bonzini
2014-02-22 9:03 ` Alex Bligh
2014-02-22 10:55 ` Paolo Bonzini [this message]
2014-02-22 12:25 ` Alex Bligh
2014-02-22 14:39 ` Paolo Bonzini
2014-03-27 12:19 ` Michael S. Tsirkin
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=5308821D.9060707@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex@alex.org.uk \
--cc=mlupfer@ddn.com \
--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.