[PATCH] qemu: aspeed_timer: Use signed muldiv for timer resets

Christian Svensson blue at cmd.nu
Tue Nov 13 05:45:10 AEDT 2018


Hi
On Mon, Nov 12, 2018 at 7:37 PM Cédric Le Goater <clg at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20181112/9f5afa98/attachment.html>


More information about the openbmc mailing list