[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251216053801.331822-1-stephen.eta.zhou@gmail.com>
Date: Tue, 16 Dec 2025 13:38:01 +0800
From: stephen.eta.zhou@...il.com
To: linux@...ck-us.net
Cc: daniel.lezcano@...aro.org,
linux-kernel@...r.kernel.org,
stephen.eta.zhou@...il.com,
tglx@...utronix.de
Subject: RE: [PATCH v4] clocksource: timer-sp804: Fix read_current_timer() issue when clock source is not registered
Hi Guenter,
On Mon, 15 Dec 2025 15:18:37 -0800, Guenter Roeck wrote:
> This patch results in a crash when trying to boot integratorcp in qemu.
Thank you for pointing out the problem.
> sp804_read_delay_timer_read from read_current_timer+0x24/0x44
>
> This is not surprising since sp804_read_delay_timer_read() calls
> sp804_read() which dereferences sched_clkevt. sched_clkevt is not
> initialized for integratorcp.
Thank you for pointing out this issue.
I will work on fixing it and submit a new patch as soon as possible.
> static int __init sp804_clocksource_and_sched_clock_init(void __iomem *base,
> const char *name,
> struct clk *clk,
> int use_sched_clock)
> {
> ...
> if (use_sched_clock) {
> sched_clkevt = clkevt;
> sched_clock_register(sp804_read, 32, rate);
> }
> ...
> static int __init integrator_cp_of_init(struct device_node *np)
> {
> ...
> ret = sp804_clocksource_and_sched_clock_init(base,
> name, clk, 0);
Thanks.
Best regards,
Stephen
Powered by blists - more mailing lists