All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-trivial] [PATCH][TRIVIAL] i6300esb: fix timer overflow
Date: Tue, 4 Aug 2015 14:47:07 +0100	[thread overview]
Message-ID: <20150804134707.GT29283@redhat.com> (raw)
In-Reply-To: <1438676851-10684-1-git-send-email-lvivier@redhat.com>

On Tue, Aug 04, 2015 at 10:27:31AM +0200, Laurent Vivier wrote:
> --- a/hw/watchdog/wdt_i6300esb.c
> +++ b/hw/watchdog/wdt_i6300esb.c
> @@ -136,7 +136,7 @@ static void i6300esb_restart_timer(I6300State *d, int stage)
>       * multiply here can exceed 64-bits, before we divide by 33MHz, so
>       * we use a higher-precision intermediate result.
>       */
> -    timeout = muldiv64(get_ticks_per_sec(), timeout, 33000000);
> +    timeout = muldiv64(timeout, get_ticks_per_sec(), 33000000);
>  
>      i6300esb_debug("stage %d, timeout %" PRIi64 "\n", d->stage, timeout);

Here are the test results for this (v2) patch:

  Requested timeout     Observed timeout
       60                    58
      120                   120
      250                   253
      270                   274
      500                   507
      520                   529
     1010                  1026
     1030                  1045
     2046                  2078
     2500    ioctl: WDIOC_SETTIMEOUT: error setting timeout: Invalid argument

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v


WARNING: multiple messages have this Message-ID (diff)
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH][TRIVIAL] i6300esb: fix timer overflow
Date: Tue, 4 Aug 2015 14:47:07 +0100	[thread overview]
Message-ID: <20150804134707.GT29283@redhat.com> (raw)
In-Reply-To: <1438676851-10684-1-git-send-email-lvivier@redhat.com>

On Tue, Aug 04, 2015 at 10:27:31AM +0200, Laurent Vivier wrote:
> --- a/hw/watchdog/wdt_i6300esb.c
> +++ b/hw/watchdog/wdt_i6300esb.c
> @@ -136,7 +136,7 @@ static void i6300esb_restart_timer(I6300State *d, int stage)
>       * multiply here can exceed 64-bits, before we divide by 33MHz, so
>       * we use a higher-precision intermediate result.
>       */
> -    timeout = muldiv64(get_ticks_per_sec(), timeout, 33000000);
> +    timeout = muldiv64(timeout, get_ticks_per_sec(), 33000000);
>  
>      i6300esb_debug("stage %d, timeout %" PRIi64 "\n", d->stage, timeout);

Here are the test results for this (v2) patch:

  Requested timeout     Observed timeout
       60                    58
      120                   120
      250                   253
      270                   274
      500                   507
      520                   529
     1010                  1026
     1030                  1045
     2046                  2078
     2500    ioctl: WDIOC_SETTIMEOUT: error setting timeout: Invalid argument

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v

  reply	other threads:[~2015-08-04 13:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 13:52 [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds Laurent Vivier
2015-08-03 14:28 ` Laurent Vivier
2015-08-03 14:46   ` Richard W.M. Jones
2015-08-03 15:02     ` Paolo Bonzini
2015-08-03 15:13       ` Laurent Vivier
2015-08-03 15:18         ` Paolo Bonzini
2015-08-03 15:35           ` Laurent Vivier
2015-08-03 16:06             ` Paolo Bonzini
2015-08-03 15:06     ` Laurent Vivier
2015-08-04  8:27 ` [Qemu-trivial] [PATCH][TRIVIAL] i6300esb: fix timer overflow Laurent Vivier
2015-08-04  8:27   ` [Qemu-devel] " Laurent Vivier
2015-08-04 13:47   ` Richard W.M. Jones [this message]
2015-08-04 13:47     ` Richard W.M. Jones
2015-08-05  0:01   ` [Qemu-trivial] " David Gibson
2015-08-05  0:01     ` [Qemu-devel] " David Gibson
2015-09-06 10:29   ` [Qemu-trivial] " Michael Tokarev
2015-09-06 10:29     ` [Qemu-devel] " Michael Tokarev
2015-09-06 14:35     ` [Qemu-trivial] " Paolo Bonzini
2015-09-06 14:35       ` [Qemu-devel] " Paolo Bonzini
2015-09-06 14:41       ` [Qemu-trivial] " Laurent Vivier
2015-09-06 14:41         ` Laurent Vivier
2015-08-04 10:13 ` [Qemu-devel] [PATCH] i6300esb: correctly convert watchdog clock ticks into nanoseconds Richard W.M. Jones
2015-08-04 10:25   ` Laurent Vivier

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=20150804134707.GT29283@redhat.com \
    --to=rjones@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.