All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Svensson <blue@cmd.nu>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: clg@kaod.org, Christian Svensson <bluecmd@google.com>,
	 "openbmc @ lists . ozlabs . org" <openbmc@lists.ozlabs.org>,
	Joel Stanley <joel@jms.id.au>
Subject: Re: [PATCH] qemu: aspeed_timer: Use signed muldiv for timer resets
Date: Fri, 11 Jan 2019 13:30:58 +0100	[thread overview]
Message-ID: <CADiuDARu6fwudJjcfJ0=sDpjQvtsog+GT5gUWu1WPTzPejFaZg@mail.gmail.com> (raw)
In-Reply-To: <CADiuDARPsPGkHP1HRm1RVP=G2scSLozSON3o5h_PuA3ngT5eXg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

Ping. What's left to be done here?

On Tue, Nov 13, 2018 at 9:58 AM Christian Svensson <blue@cmd.nu> wrote:

>
>
> On Tue, Nov 13, 2018 at 1:27 AM Andrew Jeffery <andrew@aj.id.au> wrote:
> > By inspection the concept of the patch seems okay to me. However, the
> issue
> > that host-utils.h takes care of in addition to providing helpers is
> support for
> > those helpers on systems that don't support 128-bit integers. The patch
> should
> > be sent to the upstream lists, and I don't think we should be breaking
> > qemu-arm-* generally for systems that we might not care about.
>
> Ah, yes - I missed that there were two - one for systems with int128 and
> one for them
> without. Hm, that does complicate things.
>
> Given that we only have one operand that is ever negative, how do you feel
> about a patch
> that goes along the lines of:
>
> if (delta >= 0) {
>   t->start += muldiv64(delta, NANOSECONDS_PER_SECOND, rate);
> } else {
>    t->start = (int64_t)t->start - muldiv64(-delta, NANOSECONDS_PER_SECOND,
> rate);
> }
>
> That should avoid any issues I think, save us/me from implementing a
> signed muldiv,
> but cost a bit on the readable code side.
>
>

[-- Attachment #2: Type: text/html, Size: 1701 bytes --]

  reply	other threads:[~2019-01-11 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 14:21 [PATCH] qemu: aspeed_timer: Use signed muldiv for timer resets Christian Svensson
2018-11-12 18:37 ` Cédric Le Goater
2018-11-12 18:45   ` Christian Svensson
2018-11-13  0:27     ` Andrew Jeffery
2018-11-13  8:58       ` Christian Svensson
2019-01-11 12:30         ` Christian Svensson [this message]
2019-01-14  2:14           ` Andrew Jeffery
2019-01-14  7:18             ` Christian Svensson
2019-02-11 22:52               ` Andrew Jeffery

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='CADiuDARu6fwudJjcfJ0=sDpjQvtsog+GT5gUWu1WPTzPejFaZg@mail.gmail.com' \
    --to=blue@cmd.nu \
    --cc=andrew@aj.id.au \
    --cc=bluecmd@google.com \
    --cc=clg@kaod.org \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.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.