Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-26 Thread Markus Armbruster
Cédric Le Goater writes: > On 9/27/23 04:12, Joel Stanley wrote: >> On Fri, 22 Sept 2023 at 13:21, Cédric Le Goater wrote: >> +t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); +return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); >>> >>> This MAX(MAX(x, y), 0) loo

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-26 Thread Cédric Le Goater
On 9/27/23 04:12, Joel Stanley wrote: On Fri, 22 Sept 2023 at 13:21, Cédric Le Goater wrote: +t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); +return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); This MAX(MAX(x, y), 0) looks strange to me. Would you remember where it co

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-26 Thread Joel Stanley
On Fri, 22 Sept 2023 at 13:21, Cédric Le Goater wrote: > > +t->start = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); > > +return calculate_time(t, MAX(MAX(t->match[0], t->match[1]), 0)); > > This MAX(MAX(x, y), 0) looks strange to me. Would you remember where it comes > from ? Thanks, That look

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-25 Thread Andrew Jeffery
On Mon, 25 Sep 2023, at 18:50, Cédric Le Goater wrote: > On 9/25/23 09:54, Andrew Jeffery wrote: >> >> >> On Fri, 22 Sep 2023, at 22:51, Cédric Le Goater wrote: >>> Joel, Andrew, >>> >>> On 5/25/19 17:12, Cédric Le Goater wrote: From: Joel Stanley The Linux kernel driver was up

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-25 Thread Cédric Le Goater
On 9/25/23 09:54, Andrew Jeffery wrote: On Fri, 22 Sep 2023, at 22:51, Cédric Le Goater wrote: Joel, Andrew, On 5/25/19 17:12, Cédric Le Goater wrote: From: Joel Stanley The Linux kernel driver was updated in commit 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler) t

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-25 Thread Andrew Jeffery
On Fri, 22 Sep 2023, at 22:51, Cédric Le Goater wrote: > Joel, Andrew, > > On 5/25/19 17:12, Cédric Le Goater wrote: >> From: Joel Stanley >> >> The Linux kernel driver was updated in commit 4451d3f59f2a >> ("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an >> issue observed

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-22 Thread Cédric Le Goater
Joel, Andrew, On 5/25/19 17:12, Cédric Le Goater wrote: From: Joel Stanley The Linux kernel driver was updated in commit 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an issue observed on hardware: > RELOAD register is loaded into COUNT register when the as

[Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2019-05-25 Thread Cédric Le Goater
From: Joel Stanley The Linux kernel driver was updated in commit 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an issue observed on hardware: > RELOAD register is loaded into COUNT register when the aspeed timer > is enabled, which means the next event may be