mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: stephen.eta.zhou@gmail.com
To: linux@roeck-us.net
Cc: daniel.lezcano@linaro.org, linux-kernel@vger.kernel.org,
	stephen.eta.zhou@gmail.com, tglx@linutronix.de
Subject: RE: [PATCH v4] clocksource: timer-sp804: Fix read_current_timer() issue when clock source is not registered
Date: Tue, 16 Dec 2025 13:38:01 +0800	[thread overview]
Message-ID: <20251216053801.331822-1-stephen.eta.zhou@gmail.com> (raw)
In-Reply-To: <75b00815-32e3-4489-9494-438825dd0af2@roeck-us.net>

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

  reply	other threads:[~2025-12-16  5:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25  8:43 Stephen Eta Zhou
2025-10-23  6:55 ` stephen.eta.zhou
2025-11-05 13:00 ` Daniel Lezcano
2025-11-26 14:40 ` [tip: timers/clocksource] clocksource/drivers/timer-sp804: " tip-bot2 for Stephen Eta Zhou
2025-12-15 23:18 ` [PATCH v4] clocksource: timer-sp804: " Guenter Roeck
2025-12-16  5:38   ` stephen.eta.zhou [this message]
2025-12-16  5:48     ` Guenter Roeck
2025-12-16  6:05       ` stephen.eta.zhou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251216053801.331822-1-stephen.eta.zhou@gmail.com \
    --to=stephen.eta.zhou@gmail.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®