qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] hpet: Init capability register only once
Date: Mon, 14 Jun 2010 11:27:48 -0500	[thread overview]
Message-ID: <4C165884.1050902@codemonkey.ws> (raw)
In-Reply-To: <4C15CEDD.8020104@web.de>

On 06/14/2010 01:40 AM, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> The capability register is read-only from guest POV, so we do not need
> to update it on reset.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
>    

Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   hw/hpet.c |    9 +++++----
>   1 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/hw/hpet.c b/hw/hpet.c
> index 93fc399..e9b585c 100644
> --- a/hw/hpet.c
> +++ b/hw/hpet.c
> @@ -648,10 +648,6 @@ static void hpet_reset(DeviceState *d)
>
>       s->hpet_counter = 0ULL;
>       s->hpet_offset = 0ULL;
> -    /* 64-bit main counter; LegacyReplacementRoute. */
> -    s->capability = 0x8086a001ULL;
> -    s->capability |= (s->num_timers - 1)<<  HPET_ID_NUM_TIM_SHIFT;
> -    s->capability |= ((HPET_CLK_PERIOD)<<  32);
>       s->config = 0ULL;
>       if (count>  0) {
>           /* we don't enable pit when hpet_reset is first called (by hpet_init)
> @@ -696,6 +692,11 @@ static int hpet_init(SysBusDevice *dev)
>           timer->state = s;
>       }
>
> +    /* 64-bit main counter; LegacyReplacementRoute. */
> +    s->capability = 0x8086a001ULL;
> +    s->capability |= (s->num_timers - 1)<<  HPET_ID_NUM_TIM_SHIFT;
> +    s->capability |= ((HPET_CLK_PERIOD)<<  32);
> +
>       isa_reserve_irq(RTC_ISA_IRQ);
>       qdev_init_gpio_in(&dev->qdev, hpet_handle_rtc_irq, 1);
>
>    

      reply	other threads:[~2010-06-14 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-14  6:40 [Qemu-devel] [PATCH] hpet: Init capability register only once Jan Kiszka
2010-06-14 16:27 ` Anthony Liguori [this message]

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=4C165884.1050902@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=jan.kiszka@web.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).