[PATCH] qemu: aspeed_timer: Use signed muldiv for timer resets
andrew at aj.id.au
Tue Nov 13 11:27:43 AEDT 2018
On Tue, 13 Nov 2018, at 05:15, Christian Svensson wrote:
> 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
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.
More information about the openbmc