Re: [PATCH] hw/ppc: Simplify clock update arithmetic

2023-06-29 Thread Nicholas Piggin
On Thu Jun 29, 2023 at 3:28 PM AEST, Cédric Le Goater wrote: > On 6/25/23 14:20, Nicholas Piggin wrote: > > The clock update logic reads the clock twice to compute the new clock > > value, with a value derived from the later time subtracted from a value > > derived from the earlier time. This can l

Re: [PATCH] hw/ppc: Simplify clock update arithmetic

2023-06-28 Thread Cédric Le Goater
On 6/25/23 14:20, Nicholas Piggin wrote: The clock update logic reads the clock twice to compute the new clock value, with a value derived from the later time subtracted from a value derived from the earlier time. This can lead to an underflow in subtractions in bits that are intended to cancel e

[PATCH] hw/ppc: Simplify clock update arithmetic

2023-06-25 Thread Nicholas Piggin
The clock update logic reads the clock twice to compute the new clock value, with a value derived from the later time subtracted from a value derived from the earlier time. This can lead to an underflow in subtractions in bits that are intended to cancel exactly. This might not cause any real probl