All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Svensson <blue@cmd.nu>
To: clg@kaod.org
Cc: Christian Svensson <bluecmd@google.com>,
	 "openbmc @ lists . ozlabs . org" <openbmc@lists.ozlabs.org>,
	Joel Stanley <joel@jms.id.au>,
	andrew@aj.id.au
Subject: Re: [PATCH] qemu: aspeed_timer: Use signed muldiv for timer resets
Date: Mon, 12 Nov 2018 19:45:10 +0100	[thread overview]
Message-ID: <CADiuDAQ1mjh56ibSd+tNq2NFiJFtLcAfyoC8fdd=y+4Mu+jD6w@mail.gmail.com> (raw)
In-Reply-To: <21acbd66-c75c-d5e3-fcfb-fa75421a7879@kaod.org>

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

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.

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

  reply	other threads:[~2018-11-12 18:45 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 [this message]
2018-11-13  0:27     ` Andrew Jeffery
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='CADiuDAQ1mjh56ibSd+tNq2NFiJFtLcAfyoC8fdd=y+4Mu+jD6w@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.