All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: Christian Svensson <blue@cmd.nu>, clg@kaod.org
Cc: 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: Tue, 13 Nov 2018 10:57:43 +1030	[thread overview]
Message-ID: <1542068863.1552891.1574692280.790D270F@webmail.messagingengine.com> (raw)
In-Reply-To: <CADiuDAQ1mjh56ibSd+tNq2NFiJFtLcAfyoC8fdd=y+4Mu+jD6w@mail.gmail.com>

On Tue, 13 Nov 2018, at 05:15, Christian Svensson wrote:
> Hi
> On Mon, Nov 12, 2018 at 7:37 PM Cédric Le Goater <clg@kaod.org> wrote:
> > isn't QEMU using the helpers from :
> >
> >         include/qemu/host-utils.h
> >
> > which do about the same ?
> 
> Multdiv64 only takes unsigned ints, and while I'm not familiar with the
> details of how that propagates to the division, it seems to result in
> nonsensical values for negative inputs.
> Before copying this logic here I looked for an equivalent for signed ints
> but did not find any suitable one, and the expansion seemed simple enough.
> 
> You can see more details in
> https://github.com/openbmc/qemu/issues/14#issuecomment-437692215.

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.

Andrew

  reply	other threads:[~2018-11-13  0:27 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 [this message]
2018-11-13  8:58       ` Christian Svensson
2019-01-11 12:30         ` Christian Svensson
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=1542068863.1552891.1574692280.790D270F@webmail.messagingengine.com \
    --to=andrew@aj.id.au \
    --cc=blue@cmd.nu \
    --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.